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 java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected EnvironmentVariablesenvironmentVariables -
Constructor Summary
Constructors Constructor Description DriverServicePool()DriverServicePool(EnvironmentVariables environmentVariables) -
Method Summary
Modifier and Type Method Description voidensureServiceIsRunning()protected TgetDriverService()booleanisRunning()org.openqa.selenium.WebDrivernewDriver(org.openqa.selenium.Capabilities capabilities)protected abstract org.openqa.selenium.WebDrivernewDriverInstance(org.openqa.selenium.Capabilities capabilities)Used as a fallback if the driver service cannot be used for some reason.protected abstract TnewDriverService()protected abstract java.lang.StringserviceName()voidshutdown()voidstart()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
environmentVariables
-
-
Constructor Details
-
DriverServicePool
public DriverServicePool() -
DriverServicePool
-
-
Method Details
-
newDriverService
-
serviceName
protected abstract java.lang.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
-
start
public void start() throws java.io.IOException- Throws:
java.io.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 java.io.IOException- Throws:
java.io.IOException
-