public void BeforeAll() { DesiredCapabilities capabilities = Env.isSauce() ? Caps.getAndroid18Caps(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.localURI; driver = new AndroidDriver <AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); driver.Manage().Timeouts().ImplicitlyWait(Env.IMPLICIT_TIMEOUT_SEC); }
public void BeforeAll() { DesiredCapabilities capabilities = Env.isSauce() ? Caps.getAndroid18Caps(Apps.get("selendroidTestApp")) : Caps.getAndroid19Caps(Apps.get("selendroidTestApp")); if (Env.isSauce()) { capabilities.SetCapability("username", Env.getEnvVar("SAUCE_USERNAME")); capabilities.SetCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); capabilities.SetCapability("tags", new string[] { "sample" }); } Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.localURI; driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); pageObject = new AndroidJavaScriptTestPageObject(driver); driver.StartActivity("io.selendroid.testapp", ".WebViewActivity"); }
public void BeforeAll() { DesiredCapabilities capabilities = Env.isSauce() ? Caps.getAndroid18Caps(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.localURI; driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); PageFactory.InitElements(driver, this, new AppiumPageObjectMemberDecorator(timeSpan)); }