示例#1
0
        /// <summary>
        /// Creates a default instance of the EdgeDriverService.
        /// </summary>
        /// <returns>A EdgeDriverService that implements default settings.</returns>
        public static EdgeDriverService CreateDefaultService()
        {
            string            serviceDirectory = DriverService.FindDriverServiceExecutable(MicrosoftWebDriverServiceFileName, MicrosoftWebDriverDownloadUrl);
            EdgeDriverService service          = CreateDefaultService(serviceDirectory);

            return(service);
        }
示例#2
0
        private static EdgeDriverService CreateSpecCompliantEdgeDriverService()
        {
            EdgeDriverService service = EdgeDriverService.CreateDefaultService();

            service.UseSpecCompliantProtocol = true;
            return(service);
        }
示例#3
0
        /// <summary>
        /// Creates a default instance of the EdgeDriverService.
        /// </summary>
        /// <param name="isLegacy">Wheter to use legacy mode. Default is to true.</param>
        /// <returns>A EdgeDriverService that implements default settings.</returns>
        public static EdgeDriverService CreateDefaultService(bool isLegacy = true, NetworkCredential user = null)
        {
            string serviceFileName = ChromiumDriverServiceFileName(MSEdgeDriverServiceFileName);

            if (isLegacy)
            {
                serviceFileName = MicrosoftWebDriverServiceFileName;
            }

            string            serviceDirectory = DriverService.FindDriverServiceExecutable(serviceFileName, MicrosoftWebDriverDownloadUrl);
            EdgeDriverService service          = CreateDefaultService(serviceDirectory, isLegacy, user);

            return(service);
        }
示例#4
0
 public DefaultEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
示例#5
0
 /// <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)
 {
 }
示例#6
0
 /// <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)
 {
 }
示例#7
0
 /// <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())
 {
 }
示例#8
0
 /// <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(service, options, commandTimeout)
 {
 }
示例#9
0
 public EdgeDriver(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), EdgeDriver.ConvertOptionsToCapabilities(options))
 {
 }
示例#10
0
 public ChromiumEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
示例#11
0
 /// <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))
 {
     System.Threading.Thread.Sleep(1000);
 }
示例#12
0
 /// <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(service, options, commandTimeout)
 {
     this.AddCustomEdgeCommands();
 }
 public static EdgeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
 {
     return(EdgeDriverService.CreateDefaultService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort()));
 }
 public static EdgeDriverService CreateDefaultService(string driverPath)
 {
     return(EdgeDriverService.CreateDefaultService(driverPath, "MicrosoftWebDriver.exe"));
 }
        public static EdgeDriverService CreateDefaultService()
        {
            string driverPath = DriverService.FindDriverServiceExecutable("MicrosoftWebDriver.exe", EdgeDriverService.MicrosoftWebDriverDownloadUrl);

            return(EdgeDriverService.CreateDefaultService(driverPath));
        }
示例#16
0
 public EdgeDriver(EdgeOptions options) : this(EdgeDriverService.CreateDefaultService(), options, RemoteWebDriver.DefaultCommandTimeout)
 {
 }
示例#17
0
 /// <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 })
 {
 }
 public SpecCompliantEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
示例#19
0
 public DevChannelEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
示例#20
0
 /// <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.CreateDefaultService(), options)
 {
 }
示例#21
0
 public LegacyEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
示例#22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EdgeDriver"/> class using the specified path
 /// to the directory containing EdgeDriver.exe, options, and command timeout.
 /// </summary>
 /// <param name="edgeDriverDirectory">The full path to the directory containing EdgeDriver.exe.</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.CreateDefaultService(edgeDriverDirectory), options, commandTimeout)
 {
 }
示例#23
0
 /// <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))
 {
 }
示例#24
0
 /// <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())
 {
 }
示例#25
0
 /// <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))
 {
     System.Threading.Thread.Sleep(1000);
 }