public class EventFiringWebDriver
extends java.lang.Object
implements org.openqa.selenium.WebDriver, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WrapsDriver, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.interactions.HasTouchScreen, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.HasCapabilities
WebDriver
instance which supports registering of a
WebDriverEventListener
, e.g. for logging purposes.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
Constructor and Description |
---|
EventFiringWebDriver(org.openqa.selenium.WebDriver driver) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.Object |
executeAsyncScript(java.lang.String script,
java.lang.Object... args) |
java.lang.Object |
executeScript(java.lang.String script,
java.lang.Object... args) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
java.util.List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
void |
get(java.lang.String url) |
org.openqa.selenium.Capabilities |
getCapabilities() |
java.lang.String |
getCurrentUrl() |
org.openqa.selenium.interactions.Keyboard |
getKeyboard() |
org.openqa.selenium.interactions.Mouse |
getMouse() |
java.lang.String |
getPageSource() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> target) |
java.lang.String |
getTitle() |
org.openqa.selenium.interactions.TouchScreen |
getTouch() |
java.lang.String |
getWindowHandle() |
java.util.Set<java.lang.String> |
getWindowHandles() |
org.openqa.selenium.WebDriver |
getWrappedDriver() |
org.openqa.selenium.WebDriver.Options |
manage() |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
void |
perform(java.util.Collection<org.openqa.selenium.interactions.Sequence> actions) |
void |
quit() |
EventFiringWebDriver |
register(WebDriverEventListener eventListener) |
void |
resetInputState() |
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
EventFiringWebDriver |
unregister(WebDriverEventListener eventListener) |
public EventFiringWebDriver(org.openqa.selenium.WebDriver driver)
public EventFiringWebDriver register(WebDriverEventListener eventListener)
eventListener
- the event listener to registerpublic EventFiringWebDriver unregister(WebDriverEventListener eventListener)
eventListener
- the event listener to unregisterpublic org.openqa.selenium.WebDriver getWrappedDriver()
getWrappedDriver
in interface org.openqa.selenium.WrapsDriver
public void get(java.lang.String url)
get
in interface org.openqa.selenium.WebDriver
public java.lang.String getCurrentUrl()
getCurrentUrl
in interface org.openqa.selenium.WebDriver
public java.lang.String getTitle()
getTitle
in interface org.openqa.selenium.WebDriver
public java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements
in interface org.openqa.selenium.SearchContext
findElements
in interface org.openqa.selenium.WebDriver
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement
in interface org.openqa.selenium.SearchContext
findElement
in interface org.openqa.selenium.WebDriver
public java.lang.String getPageSource()
getPageSource
in interface org.openqa.selenium.WebDriver
public void close()
close
in interface org.openqa.selenium.WebDriver
public void quit()
quit
in interface org.openqa.selenium.WebDriver
public java.util.Set<java.lang.String> getWindowHandles()
getWindowHandles
in interface org.openqa.selenium.WebDriver
public java.lang.String getWindowHandle()
getWindowHandle
in interface org.openqa.selenium.WebDriver
public java.lang.Object executeScript(java.lang.String script, java.lang.Object... args)
executeScript
in interface org.openqa.selenium.JavascriptExecutor
public java.lang.Object executeAsyncScript(java.lang.String script, java.lang.Object... args)
executeAsyncScript
in interface org.openqa.selenium.JavascriptExecutor
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target) throws org.openqa.selenium.WebDriverException
getScreenshotAs
in interface org.openqa.selenium.TakesScreenshot
org.openqa.selenium.WebDriverException
public org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo
in interface org.openqa.selenium.WebDriver
public org.openqa.selenium.WebDriver.Navigation navigate()
navigate
in interface org.openqa.selenium.WebDriver
public org.openqa.selenium.WebDriver.Options manage()
manage
in interface org.openqa.selenium.WebDriver
public org.openqa.selenium.interactions.Keyboard getKeyboard()
getKeyboard
in interface org.openqa.selenium.interactions.HasInputDevices
public org.openqa.selenium.interactions.Mouse getMouse()
getMouse
in interface org.openqa.selenium.interactions.HasInputDevices
public org.openqa.selenium.interactions.TouchScreen getTouch()
getTouch
in interface org.openqa.selenium.interactions.HasTouchScreen
public void perform(java.util.Collection<org.openqa.selenium.interactions.Sequence> actions)
perform
in interface org.openqa.selenium.interactions.Interactive
public void resetInputState()
resetInputState
in interface org.openqa.selenium.interactions.Interactive
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities
in interface org.openqa.selenium.HasCapabilities