Created
July 15, 2020 15:44
-
-
Save angelovstanton/8821b4ddf1a6c930d90f641384b9dc4d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private static AndroidDriver<AndroidElement> _driver; | |
[ClassInitialize] | |
public static void ClassInitialize(TestContext context) | |
{ | |
var appiumOptions = new AppiumOptions(); | |
appiumOptions.AddAdditionalCapability(MobileCapabilityType.BrowserName, "chrome"); | |
appiumOptions.AddAdditionalCapability("version", "mobile-79.0"); | |
appiumOptions.AddAdditionalCapability("enableVNC", true); | |
appiumOptions.AddAdditionalCapability("enableVideo", true); | |
appiumOptions.AddAdditionalCapability("desired-skin", "WSVGA"); | |
appiumOptions.AddAdditionalCapability("desired-screen-resolution", "1024x600"); | |
var timeout = TimeSpan.FromSeconds(120); | |
_driver = new AndroidDriver<AndroidElement>(new Uri("http://127.0.0.1:4444/wd/hub"), appiumOptions, timeout); | |
_driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(120); | |
_driver.Manage().Timeouts().AsynchronousJavaScript = TimeSpan.FromSeconds(120); | |
} | |
[TestCleanup] | |
public void TestCleanup() | |
{ | |
_driver?.Quit(); | |
_driver?.Dispose(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment