コード例 #1
0
 /// <summary>
 /// Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable with the given name.
 /// </summary>
 /// <param name="driverPath">The directory containing the ChromeDriver executable.</param>
 /// <param name="driverExecutableFileName">The name of the ChromeDriver executable file.</param>
 /// <returns>A ChromeDriverService using a random port.</returns>
 public static ChromeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
 {
     return(new ChromeDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort()));
 }
コード例 #2
0
 /// <summary>
 /// Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable with the given name.
 /// </summary>
 /// <param name="driverPath">The directory containing the IEDriverServer executable.</param>
 /// <param name="driverExecutableFileName">The name of the IEDriverServer executable file.</param>
 /// <returns>A InternetExplorerDriverService using a random port.</returns>
 public static InternetExplorerDriverService CreateDefaultService(string driverPath, string driverExecutableFileName)
 {
     return(new InternetExplorerDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort()));
 }
コード例 #3
0
 public static FirefoxDriverServiceEx CreateDefaultService(string driverPath, string driverExecutableFileName) =>
 new FirefoxDriverServiceEx(driverPath, driverExecutableFileName, PortUtilities.FindFreePort());
コード例 #4
0
 private PhantomJSDriverService()
     : this(FileUtilities.FindFile(PhantomJSDriverServiceFileName), PhantomJSDriverServiceFileName, PortUtilities.FindFreePort())
 {
 }
コード例 #5
0
ファイル: ChromeDriverService.cs プロジェクト: ylax/dotnet
 /// <summary>
 /// Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable with the given name.
 /// </summary>
 /// <param name="driverPath">The directory containing the ChromeDriver executable.</param>
 /// <param name="driverExecutableFileName">The name of the ChromeDriver executable file.</param>
 /// <returns>A ChromeDriverService using a random port.</returns>
 public static ChromeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName, NetworkCredential user = null)
 {
     return(new ChromeDriverService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort(), user));
 }
コード例 #6
0
 /// <summary>
 /// Creates a default instance of the PhantomJSDriverService using a specified path to the PhantomJS executable.
 /// </summary>
 /// <param name="driverPath">The directory containing the PhantomJS executable.</param>
 /// <returns>A PhantomJSDriverService using a random port.</returns>
 public static PhantomJSDriverService CreateDefaultService(string driverPath)
 {
     return(new PhantomJSDriverService(driverPath, PortUtilities.FindFreePort()));
 }
コード例 #7
0
 /// <summary>
 /// Creates a default instance of the EdgeDriverService using a specified path to the WebDriver executable with the given name.
 /// </summary>
 /// <param name="driverPath">The directory containing the WebDriver executable.</param>
 /// <param name="driverExecutableFileName">The name of the WebDriver executable file.</param>
 /// <returns>A EdgeDriverService using a random port.</returns>
 public static EdgeDriverService CreateDefaultServiceFromOptions(string driverPath, string driverExecutableFileName, EdgeOptions options)
 {
     return(CreateDefaultServiceFromOptions(driverPath, driverExecutableFileName, PortUtilities.FindFreePort(), options));
 }
コード例 #8
0
 /// <summary>
 /// Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable.
 /// </summary>
 /// <param name="driverPath">The directory containing the IEDriverServer executable.</param>
 /// <returns>A InternetExplorerDriverService using a random port.</returns>
 public static InternetExplorerDriverService CreateDefaultService(string driverPath)
 {
     return(new InternetExplorerDriverService(driverPath, PortUtilities.FindFreePort()));
 }
コード例 #9
0
 /// <summary>
 /// Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable with the given name.
 /// </summary>
 /// <param name="driverPath">The directory containing the EdgeDriver executable.</param>
 /// <param name="driverExecutableFileName">The name of the EdgeDriver executable file.</param>
 /// <returns>A EdgeDriverService using a random port.</returns>
 public static EdgeDriverService CreateDefaultService(string driverPath, string driverExecutableFileName, bool isLegacy = true)
 {
     return(CreateDefaultService(driverPath, driverExecutableFileName, PortUtilities.FindFreePort(), isLegacy));
 }