-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from TikhomirovSergey/pinch_zoom_sessionInfo
- Loading branch information
Showing
7 changed files
with
120 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using Appium.Integration.Tests.Helpers; | ||
using NUnit.Framework; | ||
using OpenQA.Selenium; | ||
using OpenQA.Selenium.Appium; | ||
using OpenQA.Selenium.Appium.Android; | ||
using OpenQA.Selenium.Remote; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Appium.Integration.Tests.Android | ||
{ | ||
class AndroidSessionTest | ||
{ | ||
private AppiumDriver<IWebElement> driver; | ||
|
||
[TestFixtureSetUp] | ||
public void BeforeAll() | ||
{ | ||
DesiredCapabilities capabilities = Env.isSauce() ? | ||
Caps.getAndroid501Caps(Apps.get("androidApiDemos")) : | ||
Caps.getAndroid19Caps(Apps.get("androidApiDemos")); | ||
if (Env.isSauce()) | ||
{ | ||
capabilities.SetCapability("username", Env.getEnvVar("SAUCE_USERNAME")); | ||
capabilities.SetCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); | ||
capabilities.SetCapability("name", "android - complex"); | ||
capabilities.SetCapability("tags", new string[] { "sample" }); | ||
} | ||
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); | ||
} | ||
|
||
[TestFixtureTearDown] | ||
public void AfterAll() | ||
{ | ||
if (driver != null) | ||
{ | ||
driver.Quit(); | ||
} | ||
if (!Env.isSauce()) | ||
{ | ||
AppiumServers.StopLocalService(); | ||
} | ||
} | ||
|
||
[Test] | ||
public void GetDeviceUDIDTest() | ||
{ | ||
string deviceUIID = driver.SessionDetails["deviceUDID"].ToString(); | ||
Assert.NotNull(deviceUIID); | ||
} | ||
|
||
[Test] | ||
public void GetDeviceDictionaryData() | ||
{ | ||
Dictionary<string, object> dictionary = (Dictionary<string, object>) driver.SessionDetails["desired"]; | ||
Assert.AreNotEqual(dictionary.Count, 0); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters