|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openqa.selenium.remote.service.DriverService.Builder
public abstract static class DriverService.Builder
Builder used to configure new DriverService
instances.
Field Summary | |
---|---|
protected com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> |
environment
|
protected java.io.File |
exe
|
protected java.io.File |
logFile
|
protected int |
port
|
Constructor Summary | |
---|---|
DriverService.Builder()
|
Method Summary | |
---|---|
DriverService |
build()
Creates a new service to manage the driver server. |
protected abstract DriverService |
buildDriverService()
Used by a template method build() to perform the driver specific checks
and instantiate the specific service object. |
DriverService.Builder |
usingAnyFreePort()
Configures the driver server to start on any available port. |
DriverService.Builder |
usingDriverExecutable(java.io.File file)
Sets which driver executable the builder will use. |
DriverService.Builder |
usingPort(int port)
Sets which port the driver server should be started on. |
DriverService.Builder |
withEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
Defines the environment for the launched driver server. |
DriverService.Builder |
withLogFile(java.io.File logFile)
Configures the driver server to write log to the given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int port
protected java.io.File exe
protected com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> environment
protected java.io.File logFile
Constructor Detail |
---|
public DriverService.Builder()
Method Detail |
---|
public DriverService.Builder usingDriverExecutable(java.io.File file)
file
- The executable to use.
public DriverService.Builder usingPort(int port)
port
- The port to use; must be non-negative.
public DriverService.Builder usingAnyFreePort()
@Beta public DriverService.Builder withEnvironment(java.util.Map<java.lang.String,java.lang.String> environment)
environment
- A map of the environment variables to launch the
server with.
public DriverService.Builder withLogFile(java.io.File logFile)
logFile
- A file to write log to.
public DriverService build()
buildDriverService()
protected abstract DriverService buildDriverService() throws java.io.IOException
build()
to perform the driver specific checks
and instantiate the specific service object.
java.io.IOException
- If an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |