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

refactor!: Update to work with Selenium 4 (with element factory) #469

Merged
merged 23 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c1e80a7
Add most fixes
TroyWalshProf Sep 8, 2021
6e0af66
Get proect to build
TroyWalshProf Sep 8, 2021
c9b612c
Use new platform setting more consistantly
TroyWalshProf Sep 10, 2021
d04122f
Get WinAppTests kind of working
TroyWalshProf Oct 1, 2021
e3c1ef2
Drop one off web elements
TroyWalshProf Oct 7, 2021
ffaa237
Use Selenium 4 RC2 and remove extra using statements
TroyWalshProf Oct 7, 2021
8f778f0
Cleanup mobile selectors and image compare test
TroyWalshProf Oct 7, 2021
7f33808
Fix mobile By bug
TroyWalshProf Oct 7, 2021
8bed9fe
Undo local test code
TroyWalshProf Oct 7, 2021
b7b2a97
Merge branch 'master' into master
TroyWalshProf Oct 7, 2021
6f0ecad
Address PR comments
TroyWalshProf Oct 8, 2021
93300a7
Merge branch 'master' of https://github.com/TroyWalshProf/appium-dotn…
TroyWalshProf Oct 8, 2021
a559075
Add back IdempotencyHeader
TroyWalshProf Oct 8, 2021
036e540
PR related cleanup
TroyWalshProf Oct 8, 2021
cb5970f
Update to latest Selenium RC
TroyWalshProf Oct 8, 2021
6eb65d9
Update PageObjects code to work with new Element and driver paradigm
TroyWalshProf Oct 8, 2021
85f66a5
Work with web element factory
TroyWalshProf Oct 10, 2021
0cf8a40
Update to work with upcoming RC4
TroyWalshProf Oct 11, 2021
2aac534
Move to official release as there will be no RC4
TroyWalshProf Oct 12, 2021
c55410b
Update copyright
TroyWalshProf Oct 13, 2021
d60ee40
Put Newtonsoft back
TroyWalshProf Oct 13, 2021
2f7a699
Use ternary operator
TroyWalshProf Oct 13, 2021
92e6864
Remove outdated using statements
TroyWalshProf Oct 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/Appium.Net/Appium.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Product>Appium-Dotnet-Driver</Product>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Copyright>Copyright © 2020</Copyright>
<Copyright>Copyright © 2021</Copyright>
<PackageProjectUrl>https://github.com/appium/appium-dotnet-driver</PackageProjectUrl>
<RepositoryUrl>https://github.com/appium/appium-dotnet-driver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand All @@ -26,8 +26,8 @@
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
<DocumentationFile>Appium.Net.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.0|AnyCPU'">
<DocumentationFile>Appium.Net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net45|AnyCPU'">
<DocumentationFile>Appium.Net.xml</DocumentationFile>
Expand All @@ -48,9 +48,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Selenium.Support" Version="3.141.0" />
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
<PackageReference Include="Selenium.Support" Version="4.0.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions src/Appium.Net/Appium.Net.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/Appium.Net/Appium/Android/AndroidDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using OpenQA.Selenium.Appium.Enums;
using OpenQA.Selenium.Appium.Interfaces;
using OpenQA.Selenium.Appium.Service;
using OpenQA.Selenium.Remote;
using System;
using System.Collections.Generic;
using System.Drawing;
Expand Down Expand Up @@ -303,7 +302,7 @@ public IList<string> GetPerformanceDataTypes() =>
public string EndTestCoverage(string intent, string path) =>
AndroidCommandExecutionHelper.EndTestCoverage(this, intent, path);

protected override RemoteWebElementFactory CreateElementFactory() => new AndroidElementFactory(this);
protected override WebElementFactory CreateElementFactory() => new AndroidElementFactory(this);

public void SetSetting(string setting, object value) =>
AndroidCommandExecutionHelper.SetSetting(this, setting, value);
Expand Down
3 changes: 1 addition & 2 deletions src/Appium.Net/Appium/Android/AndroidElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

using OpenQA.Selenium.Appium.Enums;
using OpenQA.Selenium.Appium.Interfaces;
using OpenQA.Selenium.Remote;
using System.Collections.Generic;

namespace OpenQA.Selenium.Appium.Android
Expand All @@ -26,7 +25,7 @@ public class AndroidElement : AppiumWebElement, IFindByAndroidUIAutomator<Appium
/// </summary>
/// <param name="parent">Driver in use.</param>
/// <param name="id">ID of the element.</param>
public AndroidElement(RemoteWebDriver parent, string id)
public AndroidElement(WebDriver parent, string id)
: base(parent, id)
{
}
Expand Down
7 changes: 3 additions & 4 deletions src/Appium.Net/Appium/Android/AndroidElementFactory.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using OpenQA.Selenium.Remote;


namespace OpenQA.Selenium.Appium.Android
{
public class AndroidElementFactory : CachedElementFactory<AndroidElement>
{
public AndroidElementFactory(RemoteWebDriver parentDriver) : base(parentDriver)
public AndroidElementFactory(WebDriver parentDriver) : base(parentDriver)
{
}

protected override AndroidElement CreateCachedElement(RemoteWebDriver parentDriver, string elementId)
protected override AndroidElement CreateCachedElement(WebDriver parentDriver, string elementId)
{
return new AndroidElement(parentDriver, elementId);
}
Expand Down
28 changes: 0 additions & 28 deletions src/Appium.Net/Appium/AppiumCapabilities.cs

This file was deleted.

Loading