Class WebDriverSupplier
- java.lang.Object
-
- org.shakespeareframework.selenium.WebDriverSupplier
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.function.Supplier<org.openqa.selenium.WebDriver>
- Direct Known Subclasses:
WebDriverManagerWebDriverSupplier
public abstract class WebDriverSupplier extends java.lang.Object implements java.util.function.Supplier<org.openqa.selenium.WebDriver>, java.lang.AutoCloseable
ASupplier
forWebDriver
, which also takes care ofquitting
theWebDriver
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WebDriverSupplier(BrowserType browserType, org.openqa.selenium.Capabilities additionalCapabilities)
Creates aWebDriverSupplier
for the givenBrowserType
with additionalCapabilities
that will bemerged
with theBrowserType's baseCapabilities
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BrowserType
getBrowserType()
org.openqa.selenium.Capabilities
getCapabilities()
Returns theCapabilities
for theWebDriver
, merged from theBrowserType's baseCapabilities
and additional capabilities.java.lang.String
toString()
-
-
-
Constructor Detail
-
WebDriverSupplier
protected WebDriverSupplier(BrowserType browserType, org.openqa.selenium.Capabilities additionalCapabilities)
Creates aWebDriverSupplier
for the givenBrowserType
with additionalCapabilities
that will bemerged
with theBrowserType's baseCapabilities
.- Parameters:
browserType
- theBrowserType
to be setupadditionalCapabilities
- additionalCapabilities
for theWebDriver
-
-
Method Detail
-
getBrowserType
public BrowserType getBrowserType()
- Returns:
- the
BrowserType
-
getCapabilities
public org.openqa.selenium.Capabilities getCapabilities()
Returns theCapabilities
for theWebDriver
, merged from theBrowserType's baseCapabilities
and additional capabilities.- Returns:
- the
Capabilities
that will be used for the suppliedWebDriver
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-