org.openqa.selenium.chrome
Class ChromeDriverService

java.lang.Object
  extended by org.openqa.selenium.chrome.ChromeDriverService

public class ChromeDriverService
extends java.lang.Object

Manages the life and death of a chromedriver server.


Nested Class Summary
static class ChromeDriverService.Builder
          Builder used to configure new ChromeDriverService instances.
 
Field Summary
static java.lang.String CHROME_DRIVER_EXE_PROPERTY
          System property that defines the location of the chromedriver executable that will be used by the default service.
 
Method Summary
static ChromeDriverService createDefaultService()
          Configures and returns a new ChromeDriverService using the default configuration.
 java.net.URL getUrl()
           
 boolean isRunning()
          Checks whether the chromedriver child proces is currently running.
 void start()
          Starts this service if it is not already running.
 void stop()
          Stops this service is it is currently running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHROME_DRIVER_EXE_PROPERTY

public static final java.lang.String CHROME_DRIVER_EXE_PROPERTY
System property that defines the location of the chromedriver executable that will be used by the default service.

See Also:
Constant Field Values
Method Detail

getUrl

public java.net.URL getUrl()
Returns:
The base URL for the managed chromedriver server.

createDefaultService

public static ChromeDriverService createDefaultService()
Configures and returns a new ChromeDriverService using the default configuration. In this configuration, the service will use the chromedriver executable identified by the CHROME_DRIVER_EXE_PROPERTY system property. Each service created by this method will be configured to use a free port on the current system.

Returns:
A new ChromeDriverService using the default configuration.

isRunning

public boolean isRunning()
Checks whether the chromedriver child proces is currently running.

Returns:
Whether the chromedriver child process is still running.

start

public void start()
           throws java.io.IOException
Starts this service if it is not already running. This method will block until the server has been fully started and is ready to handle commands.

Throws:
java.io.IOException - If an error occurs while spawning the child process.
See Also:
stop()

stop

public void stop()
Stops this service is it is currently running. This method will attempt to block until the server has been fully shutdown.

See Also:
start()


Copyright © 2011. All Rights Reserved.