public void BeforeAll() { AppiumOptions capabilities = Caps.getAndroid27Caps(Apps.get("androidApiDemos")); if (Env.isSauce()) { capabilities.AddAdditionalCapability("username", Env.getEnvVar("SAUCE_USERNAME")); capabilities.AddAdditionalCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); capabilities.AddAdditionalCapability("name", "android - complex"); capabilities.AddAdditionalCapability("tags", new string[] { "sample" }); } Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid; driver = new AndroidDriver <AndroidElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); driver.Manage().Timeouts().ImplicitWait = Env.IMPLICIT_TIMEOUT_SEC; }