public static void Initialize(String browserString) { if (browserString.Contains("LOCAL")) { DriverInstance = new FirefoxDriver(); isLocalRun = true; } else { DesiredCapabilities capabilities = Browsers.getCapabilities(browserString); capabilities.SetCapability("username", Constants.SauceLabsUsername); capabilities.SetCapability("accessKey", Constants.SauceLabsKey); DriverInstance = new RemoteWebDriver(new Uri(Constants.SauceLabsURL), capabilities); } TurnOnWait(); DriverInstance.Manage().Window.Maximize(); }
private static void TurnOnWait() { DriverInstance.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10)); }