/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> to use.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), ConvertOptionsToCapabilities(options)) { }
private static ICommandExecutor CreateExecutor(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout) { ICommandExecutor executor = null; if (options.UseLegacyImplementation) { // Note: If BrowserExecutableLocation is null or empty, the legacy driver // will still do the right thing, and find Firefox in the default location. FirefoxBinary binary = new FirefoxBinary(options.BrowserExecutableLocation); FirefoxProfile profile = options.Profile; if (profile == null) { profile = new FirefoxProfile(); } executor = CreateExtensionConnection(binary, profile, commandTimeout); } else { if (service == null) { throw new ArgumentNullException("service", "You requested a service-based implementation, but passed in a null service object."); } return new DriverServiceCommandExecutor(service, commandTimeout); } return executor; }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified driver service. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> used to initialize the driver.</param> public FirefoxDriver(FirefoxDriverService service) : this(service, new FirefoxOptions(), RemoteWebDriver.DefaultCommandTimeout) { }
private static FirefoxDriverService CreateService(FirefoxOptions options) { return(FirefoxDriverService.CreateDefaultService()); }
public NightlyChannelFirefoxDriver(FirefoxDriverService service, FirefoxOptions options) : base(service, options) { }
public NightlyFirefoxWebDriver(FirefoxDriverService service) : this(service, DefaultOptions) { }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified path /// to the directory containing geckodriver.exe, options, and command timeout. /// </summary> /// <param name="geckoDriverDirectory">The full path to the directory containing geckodriver.exe.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public FirefoxDriver(string geckoDriverDirectory, FirefoxOptions options, TimeSpan commandTimeout) : this(FirefoxDriverService.CreateDefaultService(geckoDriverDirectory), options, commandTimeout) { }
public StableChannelFirefoxDriver(FirefoxDriverService service) : this(service, DefaultOptions) { }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> to use.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), ConvertOptionsToCapabilities(options)) { // Add the custom commands unique to Firefox this.AddCustomFirefoxCommands(); }
public static FirefoxDriverService CreateDefaultService(string driverPath) { return(FirefoxDriverService.CreateDefaultService(driverPath, "wires.exe")); }
public StableChannelFirefoxDriver(FirefoxDriverService service, FirefoxOptions options) : base(service, options, RemoteWebDriver.DefaultCommandTimeout) { }
public static FirefoxDriverService CreateDefaultService() { string driverPath = DriverService.FindDriverServiceExecutable("wires.exe", FirefoxDriverService.FirefoxDriverDownloadUrl); return(FirefoxDriverService.CreateDefaultService(driverPath)); }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> to use.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), ConvertOptionsToCapabilities(options)) { // Add the custom commands unique to Firefox this.CommandExecutor.CommandInfoRepository.TryAddCommand(SetContextCommand, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/moz/context")); }
public NightlyChannelFirefoxDriver(FirefoxDriverService service) : this(service, DefaultOptions) { }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> public FirefoxDriver(FirefoxOptions options) : this(FirefoxDriverService.CreateDefaultService(), options, RemoteWebDriver.DefaultCommandTimeout) { }
public NightlyFirefoxWebDriver(FirefoxDriverService service) : base(service, new FirefoxOptions() { BrowserExecutableLocation = @"C:\Program Files (x86)\Nightly\firefox.exe" }, RemoteWebDriver.DefaultCommandTimeout) { }
public NightlyFirefoxWebDriver(FirefoxDriverService service, FirefoxOptions options) : base(service, options) { }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> to use.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), options.ToCapabilities()) { }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> to use.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout) : base(CreateExecutor(service, options, commandTimeout), ConvertOptionsToCapabilities(options)) { }
public ReleaseFirefoxWebDriver(FirefoxDriverService service, FirefoxOptions options) : base(service, options, RemoteWebDriver.DefaultCommandTimeout) { }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriver"/> class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. /// </summary> /// <param name="service">The <see cref="FirefoxDriverService"/> to use.</param> /// <param name="options">The <see cref="FirefoxOptions"/> to be used with the Firefox driver.</param> public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options) : this(service, options, RemoteWebDriver.DefaultCommandTimeout) { }
public ReleaseFirefoxWebDriver(FirefoxDriverService service) : this(service, DefaultOptions) { }
public ReleaseFirefoxWebDriver(FirefoxDriverService service) : base(service, new FirefoxOptions() { BrowserExecutableLocation = @"C:\Program Files\Mozilla Firefox\firefox.exe" }, RemoteWebDriver.DefaultCommandTimeout) { }