Class DriverServicePool<T extends org.openqa.selenium.remote.service.DriverService>
- java.lang.Object
-
- net.serenitybdd.core.webdriver.servicepools.DriverServicePool<T>
-
- Direct Known Subclasses:
ChromeServicePool
,EdgeServicePool
,GeckoServicePool
,InternetExplorerServicePool
,PhantomJSServicePool
public abstract class DriverServicePool<T extends org.openqa.selenium.remote.service.DriverService> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected EnvironmentVariables
environmentVariables
-
Constructor Summary
Constructors Constructor Description DriverServicePool()
DriverServicePool(EnvironmentVariables environmentVariables)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
ensureServiceIsRunning()
protected T
getDriverService()
boolean
isRunning()
org.openqa.selenium.WebDriver
newDriver(org.openqa.selenium.Capabilities capabilities)
protected abstract org.openqa.selenium.WebDriver
newDriverInstance(org.openqa.selenium.Capabilities capabilities)
Used as a fallback if the driver service cannot be used for some reason.protected abstract T
newDriverService()
protected abstract String
serviceName()
void
shutdown()
void
start()
-
-
-
Field Detail
-
environmentVariables
protected final EnvironmentVariables environmentVariables
-
-
Constructor Detail
-
DriverServicePool
public DriverServicePool()
-
DriverServicePool
public DriverServicePool(EnvironmentVariables environmentVariables)
-
-
Method Detail
-
newDriverService
protected abstract T newDriverService()
-
serviceName
protected abstract String serviceName()
-
newDriverInstance
protected abstract org.openqa.selenium.WebDriver newDriverInstance(org.openqa.selenium.Capabilities capabilities)
Used as a fallback if the driver service cannot be used for some reason.- Parameters:
capabilities
-
-
getDriverService
protected T getDriverService()
-
start
public void start() throws IOException
- Throws:
IOException
-
shutdown
public void shutdown()
-
newDriver
public org.openqa.selenium.WebDriver newDriver(org.openqa.selenium.Capabilities capabilities)
-
isRunning
public boolean isRunning()
-
ensureServiceIsRunning
public void ensureServiceIsRunning() throws IOException
- Throws:
IOException
-
-