CreateDefaultService() public static method

Creates a default instance of the PhantomJSDriverService.
public static CreateDefaultService ( ) : PhantomJSDriverService
return PhantomJSDriverService
Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PhantomJSDriver"/> class with the desired options.
 /// </summary>
 /// <param name="options">The <see cref="PhantomJSOptions"/> used to initialize the driver.</param>
 public PhantomJSDriver(PhantomJSOptions options)
     : this(PhantomJSDriverService.CreateDefaultService(), options, TimeSpan.FromSeconds(60))
 {
 }
 public static PhantomJSDriverService CreateDefaultService(string driverPath)
 {
     return(PhantomJSDriverService.CreateDefaultService(driverPath, PhantomJSDriverService.PhantomJSDriverServiceFileName));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PhantomJSDriver"/> class using the specified path
 /// to the directory containing PhantomJS.exe, options, and command timeout.
 /// </summary>
 /// <param name="phantomJSDriverServerDirectory">The full path to the directory containing PhantomJS.exe.</param>
 /// <param name="options">The <see cref="PhantomJSOptions"/> used to initialize the driver.</param>
 /// <param name="commandTimeout">The maximum amount of time to wait for each command.</param>
 public PhantomJSDriver(string phantomJSDriverServerDirectory, PhantomJSOptions options, TimeSpan commandTimeout)
     : this(PhantomJSDriverService.CreateDefaultService(phantomJSDriverServerDirectory), options, commandTimeout)
 {
 }
        public static PhantomJSDriverService CreateDefaultService()
        {
            string driverPath = DriverService.FindDriverServiceExecutable(PhantomJSDriverService.PhantomJSDriverServiceFileName, PhantomJSDriverService.PhantomJSDownloadUrl);

            return(PhantomJSDriverService.CreateDefaultService(driverPath));
        }