public static DesiredCapabilities GetCapabilitiesForRemote(IWebStartupSettings settings) { var desiredCapabilities = new DesiredCapabilities(); desiredCapabilities.SetCapability("browserName", settings.BrowserType); if (settings.TargetBrowserType == TargetBrowser.GoogleChrome) { desiredCapabilities.SetCapability("chrome.switches", new List<string> { "--disable-popup-blocking" }); } if(!string.IsNullOrEmpty(settings.BrowserVersion)) { desiredCapabilities.SetCapability("version", settings.BrowserVersion); } return desiredCapabilities; }
public static RemoteWebDriver CreateGridDriver(IWebStartupSettings settings) { return new RemoteWebDriver(settings.WebDriverHubServerUri, GetCapabilitiesForRemote(settings), settings.Timeout); }
public WebDriverFactory(IWebStartupSettings settings) { _settings = settings; }