Package net.thucydides.core.webdriver
Class WebDriverFacade
java.lang.Object
net.thucydides.core.webdriver.WebDriverFacade
- All Implemented Interfaces:
ConfigurableTimeouts,org.openqa.selenium.HasCapabilities,org.openqa.selenium.interactions.HasInputDevices,org.openqa.selenium.interactions.Interactive,org.openqa.selenium.JavascriptExecutor,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebDriver
public class WebDriverFacade
extends Object
implements org.openqa.selenium.WebDriver, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.HasCapabilities, ConfigurableTimeouts, org.openqa.selenium.interactions.Interactive
A proxy class for webdriver instances, designed to prevent the browser being opened unnecessarily.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWebDriverFacade(Class<? extends org.openqa.selenium.WebDriver> driverClass, WebDriverFactory webDriverFactory) WebDriverFacade(Class<? extends org.openqa.selenium.WebDriver> driverClass, WebDriverFactory webDriverFactory, EnvironmentVariables environmentVariables) WebDriverFacade(Class<? extends org.openqa.selenium.WebDriver> driverClass, WebDriverFactory webDriverFactory, org.openqa.selenium.WebDriver proxiedWebDriver, Duration implicitTimeout) WebDriverFacade(org.openqa.selenium.WebDriver driver, WebDriverFactory webDriverFactory, EnvironmentVariables environmentVariables) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()executeAsyncScript(String script, Object... parameters) executeScript(String script, Object... parameters) org.openqa.selenium.WebElementfindElement(org.openqa.selenium.By by) List<org.openqa.selenium.WebElement>findElements(org.openqa.selenium.By by) voidorg.openqa.selenium.CapabilitiesClass<? extends org.openqa.selenium.WebDriver>protected org.openqa.selenium.WebDriverorg.openqa.selenium.interactions.Keyboardorg.openqa.selenium.interactions.MousegetMouse()org.openqa.selenium.WebDriver<X> XgetScreenshotAs(org.openqa.selenium.OutputType<X> target) getTitle()booleanisAProxyFor(Class<? extends org.openqa.selenium.WebDriver> somedriverClass) booleanbooleanbooleanorg.openqa.selenium.WebDriver.Optionsmanage()org.openqa.selenium.WebDriver.Navigationnavigate()voidperform(Collection<org.openqa.selenium.interactions.Sequence> actions) protected booleanvoidquit()voidreset()voidvoidsetImplicitTimeout(Duration implicitTimeout) org.openqa.selenium.WebDriver.TargetLocatorswitchTo()toString()withOptions(String options) withTimeoutOf(Duration implicitTimeout)
-
Field Details
-
proxiedWebDriver
protected org.openqa.selenium.WebDriver proxiedWebDriver
-
-
Constructor Details
-
WebDriverFacade
public WebDriverFacade(Class<? extends org.openqa.selenium.WebDriver> driverClass, WebDriverFactory webDriverFactory) -
WebDriverFacade
public WebDriverFacade(Class<? extends org.openqa.selenium.WebDriver> driverClass, WebDriverFactory webDriverFactory, EnvironmentVariables environmentVariables) -
WebDriverFacade
public WebDriverFacade(org.openqa.selenium.WebDriver driver, WebDriverFactory webDriverFactory, EnvironmentVariables environmentVariables) -
WebDriverFacade
public WebDriverFacade(Class<? extends org.openqa.selenium.WebDriver> driverClass, WebDriverFactory webDriverFactory, org.openqa.selenium.WebDriver proxiedWebDriver, Duration implicitTimeout)
-
-
Method Details
-
withTimeoutOf
-
getDriverClass
-
getProxiedDriver
public org.openqa.selenium.WebDriver getProxiedDriver() -
isEnabled
public boolean isEnabled() -
reset
public void reset() -
getScreenshotAs
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target) - Specified by:
getScreenshotAsin interfaceorg.openqa.selenium.TakesScreenshot
-
get
- Specified by:
getin interfaceorg.openqa.selenium.WebDriver
-
getCurrentUrl
- Specified by:
getCurrentUrlin interfaceorg.openqa.selenium.WebDriver
-
getTitle
- Specified by:
getTitlein interfaceorg.openqa.selenium.WebDriver
-
findElements
- Specified by:
findElementsin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementsin interfaceorg.openqa.selenium.WebDriver
-
findElement
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by) - Specified by:
findElementin interfaceorg.openqa.selenium.SearchContext- Specified by:
findElementin interfaceorg.openqa.selenium.WebDriver
-
getPageSource
- Specified by:
getPageSourcein interfaceorg.openqa.selenium.WebDriver
-
setImplicitTimeout
- Specified by:
setImplicitTimeoutin interfaceConfigurableTimeouts
-
getCurrentImplicitTimeout
- Specified by:
getCurrentImplicitTimeoutin interfaceConfigurableTimeouts
-
resetTimeouts
- Specified by:
resetTimeoutsin interfaceConfigurableTimeouts
-
getDriverInstance
protected org.openqa.selenium.WebDriver getDriverInstance() -
close
public void close()- Specified by:
closein interfaceorg.openqa.selenium.WebDriver
-
quit
public void quit()- Specified by:
quitin interfaceorg.openqa.selenium.WebDriver
-
proxyInstanciated
protected boolean proxyInstanciated() -
getWindowHandles
- Specified by:
getWindowHandlesin interfaceorg.openqa.selenium.WebDriver
-
getWindowHandle
- Specified by:
getWindowHandlein interfaceorg.openqa.selenium.WebDriver
-
switchTo
public org.openqa.selenium.WebDriver.TargetLocator switchTo()- Specified by:
switchToin interfaceorg.openqa.selenium.WebDriver
-
manage
public org.openqa.selenium.WebDriver.Options manage()- Specified by:
managein interfaceorg.openqa.selenium.WebDriver
-
canTakeScreenshots
public boolean canTakeScreenshots() -
isInstantiated
public boolean isInstantiated() -
getKeyboard
public org.openqa.selenium.interactions.Keyboard getKeyboard()- Specified by:
getKeyboardin interfaceorg.openqa.selenium.interactions.HasInputDevices
-
getMouse
public org.openqa.selenium.interactions.Mouse getMouse()- Specified by:
getMousein interfaceorg.openqa.selenium.interactions.HasInputDevices
-
executeScript
- Specified by:
executeScriptin interfaceorg.openqa.selenium.JavascriptExecutor
-
executeAsyncScript
- Specified by:
executeAsyncScriptin interfaceorg.openqa.selenium.JavascriptExecutor
-
getCapabilities
public org.openqa.selenium.Capabilities getCapabilities()- Specified by:
getCapabilitiesin interfaceorg.openqa.selenium.HasCapabilities
-
getDriverName
-
toString
-
withOptions
-
isAProxyFor
-
isDisabled
public boolean isDisabled() -
perform
- Specified by:
performin interfaceorg.openqa.selenium.interactions.Interactive
-
resetInputState
public void resetInputState()- Specified by:
resetInputStatein interfaceorg.openqa.selenium.interactions.Interactive
-