|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.remote.service.DriverService
public class DriverService
Manages the life and death of a native executable driver server. It is expected that the driver server implements the WebDriver Wire Protocol. In particular, it should implement /status command that is used to check if the server is alive. In addition to this, it is supposed that the driver server implements /shutdown hook that is used to stop the server.
Nested Class Summary | |
---|---|
static class |
DriverService.Builder
Builder used to configure new DriverService instances. |
Constructor Summary | |
---|---|
protected |
DriverService(java.io.File executable,
int port,
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> environment,
java.io.File logFile)
|
Method Summary | |
---|---|
protected static java.io.File |
findExecutable(java.lang.String exeName,
java.lang.String exeProperty,
java.lang.String exeDocs,
java.lang.String exeDownload)
|
java.net.URL |
getUrl()
|
boolean |
isRunning()
Checks whether the driver child process 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 |
Constructor Detail |
---|
protected DriverService(java.io.File executable, int port, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> environment, java.io.File logFile) throws java.io.IOException
executable
- The driver executable.port
- Which port to start the driver on.environment
- The environment for the launched server.logFile
- Optional file to dump logs to.
java.io.IOException
- If an I/O error occurs.Method Detail |
---|
public java.net.URL getUrl()
protected static java.io.File findExecutable(java.lang.String exeName, java.lang.String exeProperty, java.lang.String exeDocs, java.lang.String exeDownload)
exeName
- Name of the executable file to look for in PATHexeProperty
- Name of a system property that specifies the path to the executable fileexeDocs
- The link to the driver documentation pageexeDownload
- The link to the driver download page
File
object
java.lang.IllegalStateException
- If the executable not found or cannot be executedpublic boolean isRunning()
public void start() throws java.io.IOException
java.io.IOException
- If an error occurs while spawning the child process.stop()
public void stop()
start()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |