Exemple #1
0
 private static ICapabilities ConvertOptionsToCapabilities(EdgeOptions options)
 {
     if (options == null)
     {
         throw new ArgumentNullException("options", "options must not be null");
     }
     return(options.ToCapabilities());
 }
Exemple #2
0
        private static ICapabilities ConvertOptionsToCapabilities(EdgeOptions options, bool serviceUsingChromium)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options", "options must not be null");
            }

            if (serviceUsingChromium != options.UseChromium)
            {
                if (serviceUsingChromium)
                {
                    throw new WebDriverException("options.UseChromium must be set to true when using an Edge Chromium driver service.");
                }
                else
                {
                    throw new WebDriverException("options.UseChromium must be set to false when using an Edge Legacy driver service.");
                }
            }

            return(options.ToCapabilities());
        }
Exemple #3
0
        private static ICapabilities ConvertOptionsToCapabilities(EdgeOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options", "options must not be null");
            }

            return options.ToCapabilities();
        }
Exemple #4
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), options.ToCapabilities())
 {
 }
Exemple #5
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), options.ToCapabilities())
 {
 }