/// <summary> /// Initializes a new instance of the <see cref="EdgeDriver"/> class using the specified <see cref="EdgeDriverService"/>. /// </summary> /// <param name="service">The <see cref="EdgeDriverService"/> to use.</param> /// <param name="options">The <see cref="EdgeOptions"/> to be used with the Edge driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public EdgeDriver(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), ConvertOptionsToCapabilities(options, service.UsingChromium)) { // Add the custom commands unique to Chromium this.AddCustomChromiumCommand(GetNetworkConditionsCommand, CommandInfo.GetCommand, "/session/{sessionId}/chromium/network_conditions"); this.AddCustomChromiumCommand(SetNetworkConditionsCommand, CommandInfo.PostCommand, "/session/{sessionId}/chromium/network_conditions"); this.AddCustomChromiumCommand(DeleteNetworkConditionsCommand, CommandInfo.DeleteCommand, "/session/{sessionId}/chromium/network_conditions"); this.AddCustomChromiumCommand(SendChromiumCommand, CommandInfo.PostCommand, "/session/{sessionId}/chromium/send_command"); this.AddCustomChromiumCommand(SendChromiumCommandWithResult, CommandInfo.PostCommand, "/session/{sessionId}/chromium/send_command_and_get_result"); }
/// <summary> /// Initializes a new instance of the <see cref="EdgeDriver"/> class using the specified driver service. /// </summary> /// <param name="service">The <see cref="EdgeDriverService"/> used to initialize the driver.</param> public EdgeDriver(EdgeDriverService service) : this(service, new EdgeOptions() { UseChromium = service.UsingChromium }) { }
/// <summary> /// Initializes a new instance of the <see cref="EdgeDriver"/> class using the specified options. /// </summary> /// <param name="options">The <see cref="EdgeOptions"/> to be used with the Edge driver.</param> public EdgeDriver(EdgeOptions options) : this(EdgeDriverService.CreateDefaultServiceFromOptions(options), options, RemoteWebDriver.DefaultCommandTimeout) { }
/// <summary> /// Initializes a new instance of the <see cref="EdgeDriver"/> class using the specified /// <see cref="EdgeDriverService"/> and options. /// </summary> /// <param name="service">The <see cref="EdgeDriverService"/> to use.</param> /// <param name="options">The <see cref="EdgeOptions"/> used to initialize the driver.</param> public EdgeDriver(EdgeDriverService service, EdgeOptions options) : this(service, options, RemoteWebDriver.DefaultCommandTimeout) { }
/// <summary> /// Initializes a new instance of the <see cref="EdgeDriver"/> class using the specified path /// to the directory containing the WebDriver executable, options, and command timeout. /// </summary> /// <param name="edgeDriverDirectory">The full path to the directory containing the WebDriver executable.</param> /// <param name="options">The <see cref="EdgeOptions"/> to be used with the Edge driver.</param> /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param> public EdgeDriver(string edgeDriverDirectory, EdgeOptions options, TimeSpan commandTimeout) : this(EdgeDriverService.CreateDefaultServiceFromOptions(edgeDriverDirectory, options), options, commandTimeout) { }