CreateDefaultService() public static method

Creates a default instance of the ChromeDriverService.
public static CreateDefaultService ( ) : ChromeDriverService
return ChromeDriverService
コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChromeDriver"/> class using the specified options.
 /// </summary>
 /// <param name="options">The <see cref="ChromeOptions"/> to be used with the Chrome driver.</param>
 public ChromeDriver(ChromeOptions options)
     : this(ChromeDriverService.CreateDefaultService(), options, RemoteWebDriver.DefaultCommandTimeout)
 {
 }
コード例 #2
0
ファイル: ChromeDriver.cs プロジェクト: gwestersf/Selenium2
 /// <summary>
 /// Initializes a new instance of the ChromeDriver class using the specified options.
 /// </summary>
 /// <param name="options">The <see cref="ChromeOptions"/> to be used with the Chrome driver.</param>
 public ChromeDriver(ChromeOptions options)
     : this(ChromeDriverService.CreateDefaultService(), options, TimeSpan.FromSeconds(60))
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChromeDriver"/> class using the specified path
 /// to the directory containing ChromeDriver.exe, options, and command timeout.
 /// </summary>
 /// <param name="chromeDriverDirectory">The full path to the directory containing ChromeDriver.exe.</param>
 /// <param name="options">The <see cref="ChromeOptions"/> to be used with the Chrome driver.</param>
 /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param>
 public ChromeDriver(string chromeDriverDirectory, ChromeOptions options, TimeSpan commandTimeout)
     : this(ChromeDriverService.CreateDefaultService(chromeDriverDirectory), options, commandTimeout)
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the ChromeDriver class using the capabilities.
 /// </summary>
 /// <param name="capabilities">The desired capabilities of the Chrome driver.</param>
 public ChromeDriver(ICapabilities capabilities)
     : this(ChromeDriverService.CreateDefaultService(), capabilities, TimeSpan.FromSeconds(60))
 {
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the ChromeDriver class using the specified path to the directory containing ChromeDriver.exe and capabilities.
 /// </summary>
 /// <param name="chromeDriverDirectory">The full path to the directory containing ChromeDriver.exe.</param>
 /// <param name="capabilities">The desired capabilities of the Chrome driver.</param>
 public ChromeDriver(string chromeDriverDirectory, ICapabilities capabilities)
     : this(ChromeDriverService.CreateDefaultService(chromeDriverDirectory), capabilities, TimeSpan.FromSeconds(60))
 {
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the ChromeDriver class.
 /// </summary>
 public ChromeDriver()
     : this(ChromeDriverService.CreateDefaultService(), DesiredCapabilities.Chrome(), TimeSpan.FromSeconds(60))
 {
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the ChromeDriver class using the specified path to the directory containing ChromeDriver.exe, command timeout, and capabilities.
 /// </summary>
 /// <param name="chromeDriverDirectory">The full path to the directory containing ChromeDriver.exe.</param>
 /// <param name="capabilities">The desired capabilities of the Chrome driver.</param>
 /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param>
 public ChromeDriver(string chromeDriverDirectory, ICapabilities capabilities, TimeSpan commandTimeout)
     : this(ChromeDriverService.CreateDefaultService(chromeDriverDirectory), capabilities, commandTimeout)
 {
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the ChromeDriver class.
 /// </summary>
 public ChromeDriver()
     : this(ChromeDriverService.CreateDefaultService(), TimeSpan.FromSeconds(60))
 {
 }
コード例 #9
0
 public static ChromeDriverService CreateDefaultService(string driverPath)
 {
     return(ChromeDriverService.CreateDefaultService(driverPath, ChromeDriverService.ChromeDriverServiceFileName()));
 }
コード例 #10
0
        public static ChromeDriverService CreateDefaultService()
        {
            string driverPath = DriverService.FindDriverServiceExecutable(ChromeDriverService.ChromeDriverServiceFileName(), ChromeDriverService.ChromeDriverDownloadUrl);

            return(ChromeDriverService.CreateDefaultService(driverPath));
        }