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

Updates and removals #200

Merged
merged 1 commit into from
Dec 10, 2017
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appium-dotnet-driver/Appium/AppiumDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace OpenQA.Selenium.Appium
{
public abstract class AppiumDriver<W> : RemoteWebDriver, IExecuteMethod, ITouchShortcuts, IFindsByFluentSelector<W>,
public abstract class AppiumDriver<W> : RemoteWebDriver, IExecuteMethod, IFindsByFluentSelector<W>,
IFindByAccessibilityId<W>,
IHidesKeyboard, IInteractsWithFiles,
IInteractsWithApps, IPerformsTouchActions, IRotatable, IContextAware, IGenericSearchContext<W>,
Expand Down
31 changes: 0 additions & 31 deletions appium-dotnet-driver/Appium/AppiumWebElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,37 +236,6 @@ public void Rotate(Dictionary<string, int> opts)

#endregion

#region Touch actions

/// <summary>
/// Convenience method for pinching the given element.
/// "pinching" refers to the action of two appendages pressing the screen and sliding towards each other.
/// NOTE:
/// This convenience method places the initial touches around the element, if this would happen to place one of them
/// off the screen, appium with return an outOfBounds error. In this case, revert to using the IMultiAction api
/// instead of this method.
/// </summary>
public void Pinch() => ((ITouchShortcuts) WrappedDriver).Pinch(this);

/// <summary>
/// Convenience method for tapping the center of the given element
/// </summary>
/// <param name="fingers"> number of fingers/appendages to tap with </param>
/// <param name="duration">how long between pressing down, and lifting fingers/appendages</param>
public void Tap(int fingers, int duration) => ((ITouchShortcuts) WrappedDriver).Tap(fingers, this, duration);

/// <summary>
/// Convenience method for "zooming in" on the given element.
/// "zooming in" refers to the action of two appendages pressing the screen and sliding away from each other.
/// NOTE:
/// This convenience method slides touches away from the element, if this would happen to place one of them
/// off the screen, appium will return an outOfBounds error. In this case, revert to using the IMultiAction api
/// instead of this method.
/// </summary>
public void Zoom() => ((ITouchShortcuts) WrappedDriver).Zoom(this);

#endregion

public void SetImmediateValue(string value) => Execute(AppiumDriverCommand.SetValue,
new Dictionary<string, object>() {["id"] = Id, ["value"] = value});

Expand Down
26 changes: 0 additions & 26 deletions appium-dotnet-driver/Appium/Interfaces/IMobileElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,5 @@ public interface IMobileElement<W> : IFindByAccessibilityId<W>, IGenericSearchCo
IExecuteMethod
where W : IWebElement
{
/// <summary>
/// Convenience method for pinching the given element.
/// "pinching" refers to the action of two appendages pressing the screen and sliding towards each other.
/// NOTE:
/// This convenience method places the initial touches around the element, if this would happen to place one of them
/// off the screen, appium with return an outOfBounds error. In this case, revert to using the IMultiAction api
/// instead of this method.
/// </summary>
void Pinch();

/// <summary>
/// Convenience method for tapping the center of the given element
/// </summary>
/// <param name="fingers"> number of fingers/appendages to tap with </param>
/// <param name="duration">how long between pressing down, and lifting fingers/appendages</param>
void Tap(int fingers, int duration);

/// <summary>
/// Convenience method for "zooming in" on the given element.
/// "zooming in" refers to the action of two appendages pressing the screen and sliding away from each other.
/// NOTE:
/// This convenience method slides touches away from the element, if this would happen to place one of them
/// off the screen, appium will return an outOfBounds error. In this case, revert to using the IMultiAction api
/// instead of this method.
/// </summary>
void Zoom();
}
}
102 changes: 0 additions & 102 deletions appium-dotnet-driver/Appium/Interfaces/ITouchShortcuts.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal override object getTarget(IInvocation ignored)
ITimeouts timeOuts = WebDriverUnpackUtility.UnpackWebdriver(locator.SearchContext).Manage().Timeouts();
try
{
timeOuts.ImplicitlyWait(zeroTimeSpan);
timeOuts.ImplicitWait = zeroTimeSpan;
waitingForElementList.Timeout = waitingTimeSpan.WaitingDuration;
var result = waitingForElementList.Until(ReturnWaitingFunction(locator, bys))[0];
if (shouldCache && cached == null)
Expand All @@ -56,7 +56,7 @@ internal override object getTarget(IInvocation ignored)
}
finally
{
timeOuts.ImplicitlyWait(waitingTimeSpan.WaitingDuration);
timeOuts.ImplicitWait = waitingTimeSpan.WaitingDuration;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal override object getTarget(IInvocation invocation)
ITimeouts timeOuts = WebDriverUnpackUtility.UnpackWebdriver(locator.SearchContext).Manage().Timeouts();
try
{
timeOuts.ImplicitlyWait(zeroTimeSpan);
timeOuts.ImplicitWait = zeroTimeSpan;
waitingForElementList.Timeout = waitingTimeSpan.WaitingDuration;
ReadOnlyCollection<IWebElement>
found = waitingForElementList.Until(ReturnWaitingFunction(locator, bys));
Expand All @@ -68,7 +68,7 @@ internal override object getTarget(IInvocation invocation)
}
finally
{
timeOuts.ImplicitlyWait(waitingTimeSpan.WaitingDuration);
timeOuts.ImplicitWait = waitingTimeSpan.WaitingDuration;
}

if (shouldCache && cached == null)
Expand Down
18 changes: 10 additions & 8 deletions appium-dotnet-driver/appium-dotnet-driver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@
<LangVersion>6</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc">
<HintPath>..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="Castle.Core">
<HintPath>$(SolutionDir)\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="WebDriver">
<HintPath>$(SolutionDir)\packages\Selenium.WebDriver.3.0.1\lib\net40\WebDriver.dll</HintPath>
<Reference Include="WebDriver, Version=3.8.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Selenium.WebDriver.3.8.0\lib\net45\WebDriver.dll</HintPath>
</Reference>
<Reference Include="WebDriver.Support">
<HintPath>$(SolutionDir)\packages\Selenium.Support.3.0.1\lib\net40\WebDriver.Support.dll</HintPath>
<Reference Include="WebDriver.Support, Version=3.8.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Selenium.Support.3.8.0\lib\net45\WebDriver.Support.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -145,7 +148,6 @@
<Compile Include="Appium\MultiAction\TouchAction.cs" />
<Compile Include="Appium\Interfaces\ITouchAction.cs" />
<Compile Include="Appium\Location.cs" />
<Compile Include="Appium\Interfaces\ITouchShortcuts.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down
8 changes: 4 additions & 4 deletions appium-dotnet-driver/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="Selenium.Support" version="3.0.1" targetFramework="net45" />
<package id="Selenium.WebDriver" version="3.0.1" targetFramework="net45" />
<package id="Castle.Core" version="4.2.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
<package id="Selenium.Support" version="3.8.0" targetFramework="net45" />
<package id="Selenium.WebDriver" version="3.8.0" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidActivityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
driver.CloseApp();
}

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidAppStringsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<IWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TestFixtureTearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidConnectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<IWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TestFixtureTearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidElementTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[SetUp]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidEmulatorDeviceTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidGestureTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
driver.CloseApp();
}

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidKeyPressTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[SetUp]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidLocationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidLockDeviceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidOrientationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<IWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TestFixtureTearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidSearchingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[SetUp]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidSessionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<IWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
}

[TestFixtureTearDown]
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Android/AndroidSettingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void BeforeAll()
}
Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid;
driver = new AndroidDriver<AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC);
driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC;
driver.CloseApp();
}

Expand Down
Loading