public static FirefoxDriver CreateFirefoxDriver(LocalWebBrowserFactory factory) { if (!string.IsNullOrWhiteSpace(pathToFirefoxBinary)) { return(CreateAlternativeInstance()); } try { return(new FirefoxDriver(GetFirefoxProfile())); } catch { factory.LogInfo("Default location of firefox was not found."); var env = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); if (env.Contains("(x86)")) { env = env.Replace("(x86)", "").Trim(); } var firefox = "Mozilla Firefox\\Firefox.exe"; if (File.Exists(Path.Combine(env, firefox))) { return(CreateAlternativeInstance(env, firefox)); } env = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); if (File.Exists(Path.Combine(env, firefox))) { return(CreateAlternativeInstance(env, firefox)); } throw; } }
public static EdgeDriver CreateEdgeDriver(LocalWebBrowserFactory factory) { var options = new EdgeOptions() { }; return(new EdgeDriver(options)); }
public static InternetExplorerDriver CreateInternetExplorerDriver(LocalWebBrowserFactory factory) { var options = new InternetExplorerOptions { BrowserCommandLineArguments = "-private" }; return(new InternetExplorerDriver(options)); }
public static ChromeDriver CreateChromeDriver(LocalWebBrowserFactory factory) { var options = new ChromeOptions(); options.AddArgument("test-type"); options.AddArgument("disable-popup-blocking"); options.AddArguments(factory.Capabilities); if (factory.GetBooleanOption("disableExtensions")) { options.AddArgument("--disable-extensions"); } return(new ChromeDriver(options)); }
public ChromeDevWebBrowser(LocalWebBrowserFactory factory) : base(factory) { }
public FirefoxFastWebBrowser(LocalWebBrowserFactory factory) : base(factory) { }
public InternetExplorerFastWebBrowser(LocalWebBrowserFactory factory) : base(factory) { }