Beispiel #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);
        }
Beispiel #2
0
        private static EdgeDriverService CreateSpecCompliantEdgeDriverService()
        {
            EdgeDriverService service = EdgeDriverService.CreateDefaultService();

            service.UseSpecCompliantProtocol = true;
            return(service);
        }
Beispiel #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);
        }
Beispiel #4
0
 public DefaultEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
Beispiel #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)
 {
 }
Beispiel #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)
 {
 }
Beispiel #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())
 {
 }
Beispiel #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)
 {
 }
Beispiel #9
0
 public EdgeDriver(EdgeDriverService service, EdgeOptions options, TimeSpan commandTimeout) : base(new DriverServiceCommandExecutor(service, commandTimeout), EdgeDriver.ConvertOptionsToCapabilities(options))
 {
 }
Beispiel #10
0
 public ChromiumEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
Beispiel #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);
 }
Beispiel #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));
        }
Beispiel #16
0
 public EdgeDriver(EdgeOptions options) : this(EdgeDriverService.CreateDefaultService(), options, RemoteWebDriver.DefaultCommandTimeout)
 {
 }
Beispiel #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)
 {
 }
Beispiel #19
0
 public DevChannelEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
Beispiel #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)
 {
 }
Beispiel #21
0
 public LegacyEdgeDriver(EdgeDriverService service, EdgeOptions options)
     : base(service, options)
 {
 }
Beispiel #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)
 {
 }
Beispiel #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))
 {
 }
Beispiel #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())
 {
 }
Beispiel #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);
 }