Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium 4 upgrade #271

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
694 changes: 312 additions & 382 deletions .editorconfig

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Set default behavior to automatically normalize line endings.
* text=auto

# Collapse these files in PRs by default
*.xlf linguist-generated=true
*.lcl linguist-generated=true

*.jpg binary
*.png binary
*.gif binary

# Force bash scripts to always use lf line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.in text eol=lf
*.sh text eol=lf

# Likewise, force cmd and batch scripts to always use crlf
*.cmd text eol=crlf
*.bat text eol=crlf

*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto

*.csproj text=auto
*.vbproj text=auto
*.fsproj text=auto
*.dbproj text=auto
*.sln text=auto eol=crlf

# Set linguist language for .h files explicitly based on
# https://github.com/github/linguist/issues/1626#issuecomment-401442069
# this only affects the repo's language statistics
*.h linguist-language=C
87 changes: 48 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,71 @@ name: CI
on:
push:
tags:
- v*
- v*
branches:
- main
- main
paths:
- src/**
- samples/**
- tests/**
- build/**
- tools/**
- .github/workflows/ci.yml
- src/**
- samples/**
- tests/**
- build/**
- tools/**
- .github/workflows/ci.yml
pull_request:
branches:
- main
- main
paths:
- src/**
- samples/**
- tests/**
- build/**
- tools/**
- .github/workflows/ci.yml
- src/**
- samples/**
- tests/**
- build/**
- tools/**
- .github/workflows/ci.yml
workflow_dispatch:

jobs:
build:

env:
BUILD_CONFIG: 'Release'
SOLUTION: 'src/Legerity.sln'
BUILD_CONFIG: "Release"
SOLUTION: "src/Legerity.sln"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Get Build Version
run: |
Import-Module .\build\GetBuildVersion.psm1
Write-Host $Env:GITHUB_REF
$version = GetBuildVersion -VersionString $Env:GITHUB_REF
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Get Build Version
run: |
Import-Module .\build\GetBuildVersion.psm1
Write-Host $Env:GITHUB_REF
$version = GetBuildVersion -VersionString $Env:GITHUB_REF
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore dependencies
run: dotnet restore $SOLUTION
- name: Restore dependencies
run: dotnet restore $SOLUTION

- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG -p:Version=$BUILD_VERSION --no-restore
- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG -p:Version=$BUILD_VERSION --no-restore

- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
73 changes: 41 additions & 32 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,55 @@ name: Docs
on:
push:
branches:
- main
- main
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
- docs/**
- src/**
- .github/workflows/docs.yml
pull_request:
branches:
- main
- main
paths:
- docs/**
- .github/workflows/docs.yml
- docs/**
- .github/workflows/docs.yml
workflow_dispatch:

jobs:
generate-docs:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx

- name: DocFX Build
working-directory: docs
run: docfx .\docfx.json
continue-on-error: false

- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
- uses: actions/checkout@v2

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Setup DocFX
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install docfx

- name: DocFX Build
working-directory: docs
run: docfx .\docfx.json
continue-on-error: false

- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,5 +396,3 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
*.dcvr
*.dcvr.settings
4 changes: 2 additions & 2 deletions samples/AndroidCoreSamples/AndroidCoreSamples.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="4.4.0" />
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
Expand Down
4 changes: 2 additions & 2 deletions samples/MADESampleApp/MADESampleApp.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="4.4.0" />
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
Expand Down
4 changes: 2 additions & 2 deletions samples/TelerikUwpSdkSample/TelerikUwpSdkSample.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="4.4.0" />
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="4.4.0" />
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
Expand Down
6 changes: 1 addition & 5 deletions src/Legerity.Android/AndroidByExtras.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace Legerity.Android;

using OpenQA.Selenium;
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Android.UiAutomator;

/// <summary>
/// Defines a collection of extra locator constraints for <see cref="By"/>.
/// </summary>
Expand All @@ -28,4 +24,4 @@ public static By PartialContentDescription(string contentDesc)
{
return new ByAndroidUIAutomator(new AndroidUiSelector().DescriptionContains(contentDesc));
}
}
}
Loading
Loading