Interface WebDriverListener
Classes that implement this interface are intended to be used with
EventFiringDecorator
,
read documentation for this class to find detailed usage description.
This interface provides empty default implementation for all methods that do nothing.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
afterAccept
(Alert alert) This action will be performed each time afterAlert.accept()
default void
afterActiveElement
(WebDriver.TargetLocator targetLocator, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.activeElement()
is called.default void
afterAddCookie
(WebDriver.Options options, Cookie cookie) This action will be performed each time afterWebDriver.Options.addCookie(Cookie)
default void
afterAlert
(WebDriver.TargetLocator targetLocator, Alert alert) This action will be performed each time afterWebDriver.TargetLocator.alert()
is called.default void
afterAnyAlertCall
(Alert alert, Method method, Object[] args, Object result) default void
afterAnyCall
(Object target, Method method, Object[] args, Object result) This method is called after the execution of any instance methods on the 'target' object.default void
afterAnyNavigationCall
(WebDriver.Navigation navigation, Method method, Object[] args, Object result) This method will be called after any method of aWebDriver.Navigation
instance is called.default void
afterAnyOptionsCall
(WebDriver.Options options, Method method, Object[] args, Object result) default void
afterAnyTargetLocatorCall
(WebDriver.TargetLocator targetLocator, Method method, Object[] args, Object result) Called after any method inWebDriver.TargetLocator
class.default void
afterAnyTimeoutsCall
(WebDriver.Timeouts timeouts, Method method, Object[] args, Object result) This method will be called after any method of aWebDriver.Timeouts
instance isdefault void
afterAnyWebDriverCall
(WebDriver driver, Method method, Object[] args, Object result) This method will be called after any method of aWebDriver
instance is called.default void
afterAnyWebElementCall
(WebElement element, Method method, Object[] args, Object result) This method will be called after any method of aWebElement
instance is called.default void
afterAnyWindowCall
(WebDriver.Window window, Method method, Object[] args, Object result) This method will be called after any method of aWebDriver.Window
instance isdefault void
afterBack
(WebDriver.Navigation navigation) This action will be performed each time afterWebDriver.Navigation.back()
is called.default void
afterClear
(WebElement element) This action will be performed each time afterWebElement.clear()
is called.default void
afterClick
(WebElement element) This action will be performed each time afterWebElement.click()
is called.default void
afterClose
(WebDriver driver) This method will be called afterWebDriver.close()
is called.default void
afterDefaultContent
(WebDriver.TargetLocator targetLocator, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.defaultContent()
is called.default void
afterDeleteAllCookies
(WebDriver.Options options) This action will be performed each time afterWebDriver.Options.deleteAllCookies()
default void
afterDeleteCookie
(WebDriver.Options options, Cookie cookie) This action will be performed each time afterWebDriver.Options.deleteCookie(Cookie)
default void
afterDeleteCookieNamed
(WebDriver.Options options, String name) This action will be performed each time afterWebDriver.Options.deleteCookieNamed(String)
default void
afterDismiss
(Alert alert) This action will be performed each time afterAlert.dismiss()
default void
afterExecuteAsyncScript
(WebDriver driver, String script, Object[] args, Object result) This method will be called afterJavascriptExecutor.executeAsyncScript(String, Object...)
is called.default void
afterExecuteScript
(WebDriver driver, String script, Object[] args, Object result) This method will be called afterJavascriptExecutor.executeScript(ScriptKey, Object...)
is called.default void
afterFindElement
(WebDriver driver, By locator, WebElement result) This method will be called afterWebDriver.findElement(By)
is called.default void
afterFindElement
(WebElement element, By locator, WebElement result) This action will be performed each time afterWebElement.findElement(By)
is called.default void
afterFindElements
(WebDriver driver, By locator, List<WebElement> result) This method will be called afterWebDriver.findElements(By)
is called.default void
afterFindElements
(WebElement element, By locator, List<WebElement> result) This action will be performed each time afterWebElement.findElements(By)
is called.default void
afterForward
(WebDriver.Navigation navigation) This action will be performed each time afterWebDriver.Navigation.forward()
is called.default void
afterFrame
(WebDriver.TargetLocator targetLocator, int index, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.frame(int)
()} is called.default void
afterFrame
(WebDriver.TargetLocator targetLocator, String nameOrId, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.frame(String)
()} is called.default void
afterFrame
(WebDriver.TargetLocator targetLocator, WebElement frameElement, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.frame(WebElement)
()} is called.default void
afterFullscreen
(WebDriver.Window window) This action will be performed each time afterWebDriver.Window.fullscreen()
is called.default void
This method will be called afterWebDriver.get(String)
is called.default void
afterGetAttribute
(WebElement element, String name, String result) This action will be performed each time afterWebElement.getAttribute(String)
is called.default void
afterGetCookieNamed
(WebDriver.Options options, String name, Cookie result) This action will be performed each time afterWebDriver.Options.getCookieNamed(String)
default void
afterGetCookies
(WebDriver.Options options, Set<Cookie> result) This action will be performed each time afterWebDriver.Options.getCookies()
default void
afterGetCssValue
(WebElement element, String propertyName, String result) This action will be performed each time afterWebElement.getCssValue(String)
is called.default void
afterGetCurrentUrl
(WebDriver driver, String result) This method will be called afterWebDriver.getCurrentUrl()
is called.default void
afterGetLocation
(WebElement element, Point result) This action will be performed each time afterWebElement.getLocation()
is called.default void
afterGetPageSource
(WebDriver driver, String result) This method will be called afterWebDriver.getPageSource()
is called.default void
afterGetPosition
(WebDriver.Window window, Point result) This action will be performed each time afterWebDriver.Window.getPosition()
is called.default void
afterGetSize
(WebDriver.Window window, Dimension result) This action will be performed each time afterWebDriver.Window.getSize()
is called.default void
afterGetSize
(WebElement element, Dimension result) This action will be performed each time afterWebElement.getSize()
is called.default void
afterGetTagName
(WebElement element, String result) This action will be performed each time afterWebElement.getTagName()
is called.default void
afterGetText
(Alert alert, String result) This action will be performed each time afterAlert.getText()
default void
afterGetText
(WebElement element, String result) This action will be performed each time afterWebElement.getText()
is called.default void
afterGetTitle
(WebDriver driver, String result) This method will be called afterWebDriver.getTitle()
is called.default void
afterGetWindowHandle
(WebDriver driver, String result) This method will be called afterWebDriver.getWindowHandle()
is called.default void
afterGetWindowHandles
(WebDriver driver, Set<String> result) This method will be called afterWebDriver.getWindowHandles()
is called.default void
afterImplicitlyWait
(WebDriver.Timeouts timeouts, Duration duration) This action will be performed each time afterWebDriver.Timeouts.implicitlyWait(Duration)
is called.default void
afterIsDisplayed
(WebElement element, boolean result) This action will be performed each time afterWebElement.isDisplayed()
is called.default void
afterIsEnabled
(WebElement element, boolean result) This action will be performed each time afterWebElement.isEnabled()
is called.default void
afterIsSelected
(WebElement element, boolean result) This action will be performed each time afterWebElement.isSelected()
is called.default void
afterMaximize
(WebDriver.Window window) This action will be performed each time afterWebDriver.Window.maximize()
is called.default void
afterNewWindow
(WebDriver.TargetLocator targetLocator, WindowType typeHint, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.newWindow(WindowType)
is called.default void
afterPageLoadTimeout
(WebDriver.Timeouts timeouts, Duration duration) This action will be performed each time afterWebDriver.Timeouts.pageLoadTimeout(Duration)
is called.default void
afterParentFrame
(WebDriver.TargetLocator targetLocator, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.parentFrame()
is called.default void
afterPerform
(WebDriver driver, Collection<Sequence> actions) This method will be called afterActions.perform()
} is called.default void
This method will be called afterWebDriver.quit()
is called.default void
afterRefresh
(WebDriver.Navigation navigation) This action will be performed each time afterWebDriver.Navigation.refresh()
is called.default void
afterResetInputState
(WebDriver driver) This method will be called afterRemoteWebDriver.resetInputState()
is called.default void
afterSendKeys
(Alert alert, String text) This action will be performed each time afterAlert.sendKeys(String)
default void
afterSendKeys
(WebElement element, CharSequence... keysToSend) default void
afterSetPosition
(WebDriver.Window window, Point position) This action will be performed each time afterWebDriver.Window.setPosition(Point)
is called.default void
afterSetScriptTimeout
(WebDriver.Timeouts timeouts, Duration duration) This action will be performed each time afterWebDriver.Timeouts.setScriptTimeout(Duration)
is called.default void
afterSetSize
(WebDriver.Window window, Dimension size) This action will be performed each time afterWebDriver.Window.setSize(Dimension)
is called.default void
afterSubmit
(WebElement element) This action will be performed each time afterWebElement.submit()
is called.default void
afterTo
(WebDriver.Navigation navigation, String url) This action will be performed each time afterWebDriver.Navigation.to(String)
is called.default void
afterTo
(WebDriver.Navigation navigation, URL url) This action will be performed each time afterWebDriver.Navigation.to(URL)
is called.default void
afterWindow
(WebDriver.TargetLocator targetLocator, String nameOrHandle, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.window(String)
.default void
beforeAccept
(Alert alert) This action will be performed each time beforeAlert.accept()
default void
beforeActiveElement
(WebDriver.TargetLocator targetLocator) This action will be performed each time beforeWebDriver.TargetLocator.activeElement()
is called.default void
beforeAddCookie
(WebDriver.Options options, Cookie cookie) This action will be performed each time beforeWebDriver.Options.addCookie(Cookie)
default void
beforeAlert
(WebDriver.TargetLocator targetLocator) This action will be performed each time beforeWebDriver.TargetLocator.alert()
is called.default void
beforeAnyAlertCall
(Alert alert, Method method, Object[] args) default void
beforeAnyCall
(Object target, Method method, Object[] args) This method is called before the execution of any method on the 'target' object.default void
beforeAnyNavigationCall
(WebDriver.Navigation navigation, Method method, Object[] args) This method will be called before any method of aWebDriver.Navigation
instance is called.default void
beforeAnyOptionsCall
(WebDriver.Options options, Method method, Object[] args) default void
beforeAnyTargetLocatorCall
(WebDriver.TargetLocator targetLocator, Method method, Object[] args) Called before any method inWebDriver.TargetLocator
class.default void
beforeAnyTimeoutsCall
(WebDriver.Timeouts timeouts, Method method, Object[] args) This method will be called before any method of aWebDriver.Timeouts
instance isdefault void
beforeAnyWebDriverCall
(WebDriver driver, Method method, Object[] args) This method will be called before any method of aWebDriver
instance is called.default void
beforeAnyWebElementCall
(WebElement element, Method method, Object[] args) This method will be called before any method of aWebElement
instance is called.default void
beforeAnyWindowCall
(WebDriver.Window window, Method method, Object[] args) This method will be called before any method of aWebDriver.Window
instance isdefault void
beforeBack
(WebDriver.Navigation navigation) This action will be performed each time beforeWebDriver.Navigation.back()
is called.default void
beforeClear
(WebElement element) This action will be performed each time beforeWebElement.clear()
is called.default void
beforeClick
(WebElement element) This action will be performed each time beforeWebElement.click()
is called.default void
beforeClose
(WebDriver driver) This method will be called beforeWebDriver.close()
is called.default void
beforeDefaultContent
(WebDriver.TargetLocator targetLocator) This action will be performed each time beforeWebDriver.TargetLocator.defaultContent()
is called.default void
beforeDeleteAllCookies
(WebDriver.Options options) This action will be performed each time beforeWebDriver.Options.deleteAllCookies()
default void
beforeDeleteCookie
(WebDriver.Options options, Cookie cookie) This action will be performed each time beforeWebDriver.Options.deleteCookie(Cookie)
default void
beforeDeleteCookieNamed
(WebDriver.Options options, String name) This action will be performed each time beforeWebDriver.Options.deleteCookieNamed(String)
default void
beforeDismiss
(Alert alert) This action will be performed each time beforeAlert.dismiss()
default void
beforeExecuteAsyncScript
(WebDriver driver, String script, Object[] args) This method will be called beforeJavascriptExecutor.executeAsyncScript(String, Object...)
is called.default void
beforeExecuteScript
(WebDriver driver, String script, Object[] args) This method will be called beforeJavascriptExecutor.executeScript(ScriptKey, Object...)
is called.default void
beforeFindElement
(WebDriver driver, By locator) This method will be called beforeWebDriver.findElement(By)
is called.default void
beforeFindElement
(WebElement element, By locator) This action will be performed each time beforeWebElement.findElement(By)
is called.default void
beforeFindElements
(WebDriver driver, By locator) This method will be called beforeWebDriver.findElements(By)
is called.default void
beforeFindElements
(WebElement element, By locator) This action will be performed each time beforeWebElement.findElements(By)
is called.default void
beforeForward
(WebDriver.Navigation navigation) This action will be performed each time beforeWebDriver.Navigation.forward()
is called.default void
beforeFrame
(WebDriver.TargetLocator targetLocator, int index) This action will be performed each time beforeWebDriver.TargetLocator.frame(int)
()} is called.default void
beforeFrame
(WebDriver.TargetLocator targetLocator, String nameOrId) This action will be performed each time beforeWebDriver.TargetLocator.frame(String)
()} is called.default void
beforeFrame
(WebDriver.TargetLocator targetLocator, WebElement frameElement) This action will be performed each time beforeWebDriver.TargetLocator.frame(WebElement)
()} is called.default void
beforeFullscreen
(WebDriver.Window window) This action will be performed each time beforeWebDriver.Window.fullscreen()
is called.default void
This method will be called beforeWebDriver.get(String)
is called.default void
beforeGetAttribute
(WebElement element, String name) This action will be performed each time beforeWebElement.getAttribute(String)
is called.default void
beforeGetCookieNamed
(WebDriver.Options options, String name) This action will be performed each time beforeWebDriver.Options.getCookieNamed(String)
default void
beforeGetCookies
(WebDriver.Options options) This action will be performed each time beforeWebDriver.Options.getCookies()
default void
beforeGetCssValue
(WebElement element, String propertyName) This action will be performed each time beforeWebElement.getCssValue(String)
is called.default void
beforeGetCurrentUrl
(WebDriver driver) This method will be called beforeWebDriver.getCurrentUrl()
is called.default void
beforeGetLocation
(WebElement element) This action will be performed each time beforeWebElement.getLocation()
is called.default void
beforeGetPageSource
(WebDriver driver) This method will be called beforeWebDriver.getPageSource()
is called.default void
beforeGetPosition
(WebDriver.Window window) This action will be performed each time beforeWebDriver.Window.getPosition()
is called.default void
beforeGetSize
(WebDriver.Window window) This action will be performed each time beforeWebDriver.Window.getSize()
is called.default void
beforeGetSize
(WebElement element) This action will be performed each time beforeWebElement.getSize()
is called.default void
beforeGetTagName
(WebElement element) This action will be performed each time beforeWebElement.getTagName()
is called.default void
beforeGetText
(Alert alert) This action will be performed each time beforeAlert.getText()
default void
beforeGetText
(WebElement element) This action will be performed each time beforeWebElement.getText()
is called.default void
beforeGetTitle
(WebDriver driver) This method will be called beforeWebDriver.getTitle()
is called.default void
beforeGetWindowHandle
(WebDriver driver) This method will be called beforeWebDriver.getWindowHandle()
is called.default void
beforeGetWindowHandles
(WebDriver driver) This method will be called beforeWebDriver.getWindowHandles()
is called.default void
beforeImplicitlyWait
(WebDriver.Timeouts timeouts, Duration duration) This action will be performed each time beforeWebDriver.Timeouts.implicitlyWait(Duration)
is called.default void
beforeIsDisplayed
(WebElement element) This action will be performed each time beforeWebElement.isDisplayed()
is called.default void
beforeIsEnabled
(WebElement element) This action will be performed each time beforeWebElement.isEnabled()
is called.default void
beforeIsSelected
(WebElement element) This action will be performed each time beforeWebElement.isSelected()
is called.default void
beforeMaximize
(WebDriver.Window window) This action will be performed each time beforeWebDriver.Window.maximize()
is called.default void
beforeNewWindow
(WebDriver.TargetLocator targetLocator, WindowType typeHint) This action will be performed each time beforeWebDriver.TargetLocator.newWindow(WindowType)
is called.default void
beforePageLoadTimeout
(WebDriver.Timeouts timeouts, Duration duration) This action will be performed each time beforeWebDriver.Timeouts.pageLoadTimeout(Duration)
is called.default void
beforeParentFrame
(WebDriver.TargetLocator targetLocator) This action will be performed each time beforeWebDriver.TargetLocator.parentFrame()
is called.default void
beforePerform
(WebDriver driver, Collection<Sequence> actions) This method will be called beforeActions.perform()
} is called.default void
beforeQuit
(WebDriver driver) This method will be called beforeWebDriver.quit()
is called.default void
beforeRefresh
(WebDriver.Navigation navigation) This action will be performed each time beforeWebDriver.Navigation.refresh()
is called.default void
beforeResetInputState
(WebDriver driver) This method will be called beforeRemoteWebDriver.resetInputState()
is called.default void
beforeSendKeys
(Alert alert, String text) This action will be performed each time beforeAlert.sendKeys(String)
default void
beforeSendKeys
(WebElement element, CharSequence... keysToSend) This action will be performed each time beforeWebElement.sendKeys(CharSequence...)
is called.default void
beforeSetPosition
(WebDriver.Window window, Point position) This action will be performed each time beforeWebDriver.Window.setPosition(Point)
is called.default void
beforeSetScriptTimeout
(WebDriver.Timeouts timeouts, Duration duration) This action will be performed each time beforeWebDriver.Timeouts.setScriptTimeout(Duration)
is called.default void
beforeSetSize
(WebDriver.Window window, Dimension size) This action will be performed each time beforeWebDriver.Window.setSize(Dimension)
is called.default void
beforeSubmit
(WebElement element) This action will be performed each time beforeWebElement.submit()
is called.default void
beforeTo
(WebDriver.Navigation navigation, String url) This action will be performed each time beforeWebDriver.Navigation.to(String)
is called.default void
beforeTo
(WebDriver.Navigation navigation, URL url) This action will be performed each time beforeWebDriver.Navigation.to(URL)
is called.default void
beforeWindow
(WebDriver.TargetLocator targetLocator, String nameOrHandle) This action will be performed each time beforeWebDriver.TargetLocator.window(String)
.default void
onError
(Object target, Method method, Object[] args, InvocationTargetException e) Notifies registered listeners about an error that occurred during the execution of a decorated method.
-
Method Details
-
beforeAnyCall
This method is called before the execution of any method on the 'target' object. It provides a hook for performing actions or logging before any method call.- Parameters:
target
- The original object on which methods will be invoked.method
- The method that will be called on the 'target' object.args
- The arguments that will be passed to the method.
-
afterAnyCall
This method is called after the execution of any instance methods on the 'target' object. It provides a hook for performing actions or logging after any instance method call.- Parameters:
target
- The original object on which instance methods were invoked.method
- The method that was called on the 'target' object.args
- The arguments passed to the method.result
- The result returned by the method.
-
onError
Notifies registered listeners about an error that occurred during the execution of a decorated method.- Parameters:
target
- The original object on which the decorated method was invoked.method
- The method that encountered an error.args
- The arguments passed to the method.e
- The InvocationTargetException containing the error details.
-
beforeAnyWebDriverCall
This method will be called before any method of aWebDriver
instance is called.- Parameters:
driver
- - decorated WebDriver instancemethod
- - method that will be calledargs
- - arguments for the method
-
afterAnyWebDriverCall
This method will be called after any method of aWebDriver
instance is called.- Parameters:
driver
- - decorated WebDriver instancemethod
- - method that was calledargs
- - arguments for the methodresult
- - result of the method call
-
beforeGet
This method will be called beforeWebDriver.get(String)
is called.- Parameters:
driver
- - decorated WebDriver instanceurl
- - url to navigate to
-
afterGet
This method will be called afterWebDriver.get(String)
is called.- Parameters:
driver
- - decorated WebDriver instanceurl
- - url navigated to
-
beforeGetCurrentUrl
This method will be called beforeWebDriver.getCurrentUrl()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterGetCurrentUrl
This method will be called afterWebDriver.getCurrentUrl()
is called.- Parameters:
driver
- - decorated WebDriver instanceresult
- - url of the current page
-
beforeGetTitle
This method will be called beforeWebDriver.getTitle()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterGetTitle
This method will be called afterWebDriver.getTitle()
is called.- Parameters:
driver
- - decorated WebDriver instanceresult
- - title of the current page
-
beforeFindElement
This method will be called beforeWebDriver.findElement(By)
is called.- Parameters:
driver
- - decorated WebDriver instancelocator
- - locator used to find the element
-
afterFindElement
This method will be called afterWebDriver.findElement(By)
is called.- Parameters:
driver
- - decorated WebDriver instancelocator
- - locator used to find the elementresult
- - found WebElement
-
beforeFindElements
This method will be called beforeWebDriver.findElements(By)
is called.- Parameters:
driver
- - decorated WebDriver instancelocator
- - locator used to find the elements
-
afterFindElements
This method will be called afterWebDriver.findElements(By)
is called.- Parameters:
driver
- - decorated WebDriver instancelocator
- - locator used to find the elementsresult
- - list of found WebElements
-
beforeGetPageSource
This method will be called beforeWebDriver.getPageSource()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterGetPageSource
This method will be called afterWebDriver.getPageSource()
is called.- Parameters:
driver
- - decorated WebDriver instanceresult
- - page source of the current page
-
beforeClose
This method will be called beforeWebDriver.close()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterClose
This method will be called afterWebDriver.close()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
beforeQuit
This method will be called beforeWebDriver.quit()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterQuit
This method will be called afterWebDriver.quit()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
beforeGetWindowHandles
This method will be called beforeWebDriver.getWindowHandles()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterGetWindowHandles
This method will be called afterWebDriver.getWindowHandles()
is called.- Parameters:
driver
- - decorated WebDriver instanceresult
- - set of window handles
-
beforeGetWindowHandle
This method will be called beforeWebDriver.getWindowHandle()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterGetWindowHandle
This method will be called afterWebDriver.getWindowHandle()
is called.- Parameters:
driver
- - decorated WebDriver instanceresult
- - window handle of the current window
-
beforeExecuteScript
This method will be called beforeJavascriptExecutor.executeScript(ScriptKey, Object...)
is called.- Parameters:
driver
- - decorated WebDriver instancescript
- - script to be executedargs
- - arguments to the script
-
afterExecuteScript
This method will be called afterJavascriptExecutor.executeScript(ScriptKey, Object...)
is called.- Parameters:
driver
- - decorated WebDriver instancescript
- - script to be executedargs
- - arguments to the scriptresult
- - result of the script execution
-
beforeExecuteAsyncScript
This method will be called beforeJavascriptExecutor.executeAsyncScript(String, Object...)
is called.- Parameters:
driver
- - decorated WebDriver instancescript
- - script to be executedargs
- - arguments to the script
-
afterExecuteAsyncScript
This method will be called afterJavascriptExecutor.executeAsyncScript(String, Object...)
is called.- Parameters:
driver
- - decorated WebDriver instancescript
- - script to be executedargs
- - arguments to the scriptresult
- - result of the script execution
-
beforePerform
This method will be called beforeActions.perform()
} is called.- Parameters:
driver
- - decorated WebDriver instanceactions
- - sequence of actions to be performed
-
afterPerform
This method will be called afterActions.perform()
} is called.- Parameters:
driver
- - decorated WebDriver instanceactions
- - sequence of actions to be performed
-
beforeResetInputState
This method will be called beforeRemoteWebDriver.resetInputState()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
afterResetInputState
This method will be called afterRemoteWebDriver.resetInputState()
is called.- Parameters:
driver
- - decorated WebDriver instance
-
beforeAnyWebElementCall
This method will be called before any method of aWebElement
instance is called.- Parameters:
element
- - decorated WebElement instancemethod
- - method that will be calledargs
- - arguments for the method
-
afterAnyWebElementCall
default void afterAnyWebElementCall(WebElement element, Method method, Object[] args, Object result) This method will be called after any method of aWebElement
instance is called.- Parameters:
element
- - decorated WebElement instancemethod
- - method that was calledargs
- - arguments for the methodresult
- - result of the method call
-
beforeClick
This action will be performed each time beforeWebElement.click()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterClick
This action will be performed each time afterWebElement.click()
is called.- Parameters:
element
- - decorated WebElement instance
-
beforeSubmit
This action will be performed each time beforeWebElement.submit()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterSubmit
This action will be performed each time afterWebElement.submit()
is called.- Parameters:
element
- - decorated WebElement instance
-
beforeSendKeys
This action will be performed each time beforeWebElement.sendKeys(CharSequence...)
is called.- Parameters:
element
- - decorated WebElement instancekeysToSend
- - keys to send
-
afterSendKeys
-
beforeClear
This action will be performed each time beforeWebElement.clear()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterClear
This action will be performed each time afterWebElement.clear()
is called.- Parameters:
element
- - decorated WebElement instance
-
beforeGetTagName
This action will be performed each time beforeWebElement.getTagName()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterGetTagName
This action will be performed each time afterWebElement.getTagName()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (tag name of the element)
-
beforeGetAttribute
This action will be performed each time beforeWebElement.getAttribute(String)
is called.- Parameters:
element
- - decorated WebElement instancename
- - name of the attribute
-
afterGetAttribute
This action will be performed each time afterWebElement.getAttribute(String)
is called.- Parameters:
element
- - decorated WebElement instancename
- - name of the attributeresult
- - result of the method call (value of the attribute)
-
beforeIsSelected
This action will be performed each time beforeWebElement.isSelected()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterIsSelected
This action will be performed each time afterWebElement.isSelected()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (true if the element is selected)
-
beforeIsEnabled
This action will be performed each time beforeWebElement.isEnabled()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterIsEnabled
This action will be performed each time afterWebElement.isEnabled()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (true if the element is enabled)
-
beforeGetText
This action will be performed each time beforeWebElement.getText()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterGetText
This action will be performed each time afterWebElement.getText()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (text of the element)
-
beforeFindElement
This action will be performed each time beforeWebElement.findElement(By)
is called.- Parameters:
element
- - decorated WebElement instancelocator
- - locator used to find the elements
-
afterFindElement
This action will be performed each time afterWebElement.findElement(By)
is called.- Parameters:
element
- - decorated WebElement instancelocator
- - locator used to find the elementsresult
- - found WebElement (can be null)
-
beforeFindElements
This action will be performed each time beforeWebElement.findElements(By)
is called.- Parameters:
element
- - decorated WebElement instancelocator
- - locator used to find the elements
-
afterFindElements
This action will be performed each time afterWebElement.findElements(By)
is called.- Parameters:
element
- - decorated WebElement instancelocator
- - locator used to find the elementsresult
- - list of found WebElements (can be empty)
-
beforeIsDisplayed
This action will be performed each time beforeWebElement.isDisplayed()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterIsDisplayed
This action will be performed each time afterWebElement.isDisplayed()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (true if the element is displayed)
-
beforeGetLocation
This action will be performed each time beforeWebElement.getLocation()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterGetLocation
This action will be performed each time afterWebElement.getLocation()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (coordinates of the top-left corner of the element)
-
beforeGetSize
This action will be performed each time beforeWebElement.getSize()
is called.- Parameters:
element
- - decorated WebElement instance
-
afterGetSize
This action will be performed each time afterWebElement.getSize()
is called.- Parameters:
element
- - decorated WebElement instanceresult
- - result of the method call (size of the element)
-
beforeGetCssValue
This action will be performed each time beforeWebElement.getCssValue(String)
is called.- Parameters:
element
- - decorated WebElement instancepropertyName
- - name of the css property
-
afterGetCssValue
This action will be performed each time afterWebElement.getCssValue(String)
is called.- Parameters:
element
- - decorated WebElement instancepropertyName
- - name of the css propertyresult
- - result of the method call (value of the css property)
-
beforeAnyAlertCall
- Parameters:
alert
- - The alert that will be calledmethod
- - The method that will be calledargs
- - The arguments that will be passed to the method
-
afterAnyAlertCall
-
beforeAccept
This action will be performed each time beforeAlert.accept()
- Parameters:
alert
- - alert to accept
-
afterAccept
This action will be performed each time afterAlert.accept()
- Parameters:
alert
- - alert to accept
-
beforeDismiss
This action will be performed each time beforeAlert.dismiss()
- Parameters:
alert
- - alert to dismiss
-
afterDismiss
This action will be performed each time afterAlert.dismiss()
- Parameters:
alert
- - alert to dismiss
-
beforeGetText
This action will be performed each time beforeAlert.getText()
- Parameters:
alert
- - alert to get text from
-
afterGetText
This action will be performed each time afterAlert.getText()
- Parameters:
alert
- - alert to get text from
-
beforeSendKeys
This action will be performed each time beforeAlert.sendKeys(String)
- Parameters:
alert
- - alert to send keys totext
- - keys to send
-
afterSendKeys
This action will be performed each time afterAlert.sendKeys(String)
- Parameters:
alert
- - alert to send keys totext
- - keys to send
-
beforeAnyOptionsCall
- Parameters:
options
- The options object that will be calledmethod
- The method that will be calledargs
- The arguments that will be passed to the method
-
afterAnyOptionsCall
default void afterAnyOptionsCall(WebDriver.Options options, Method method, Object[] args, Object result) - Parameters:
options
- The options object that will be calledmethod
- The method that will be calledargs
- The arguments that will be passed to the methodresult
- The result of the method call
-
beforeAddCookie
This action will be performed each time beforeWebDriver.Options.addCookie(Cookie)
- Parameters:
options
- - options to add cookie tocookie
- - cookie to add
-
afterAddCookie
This action will be performed each time afterWebDriver.Options.addCookie(Cookie)
- Parameters:
options
- - options to add cookie tocookie
- - cookie to add
-
beforeDeleteCookieNamed
This action will be performed each time beforeWebDriver.Options.deleteCookieNamed(String)
- Parameters:
options
- - options to delete cookie fromname
- - name of the cookie to delete
-
afterDeleteCookieNamed
This action will be performed each time afterWebDriver.Options.deleteCookieNamed(String)
- Parameters:
options
- - options to delete cookie fromname
- - name of the cookie to delete
-
beforeDeleteCookie
This action will be performed each time beforeWebDriver.Options.deleteCookie(Cookie)
- Parameters:
options
- - options to delete cookie fromcookie
- - cookie to delete
-
afterDeleteCookie
This action will be performed each time afterWebDriver.Options.deleteCookie(Cookie)
- Parameters:
options
- - options to delete cookie fromcookie
- - cookie to delete
-
beforeDeleteAllCookies
This action will be performed each time beforeWebDriver.Options.deleteAllCookies()
- Parameters:
options
- - options to delete cookies from
-
afterDeleteAllCookies
This action will be performed each time afterWebDriver.Options.deleteAllCookies()
- Parameters:
options
- - options to delete cookies from
-
beforeGetCookies
This action will be performed each time beforeWebDriver.Options.getCookies()
- Parameters:
options
- - options to get cookies from
-
afterGetCookies
This action will be performed each time afterWebDriver.Options.getCookies()
- Parameters:
options
- - options to get cookies fromresult
- - set of cookies
-
beforeGetCookieNamed
This action will be performed each time beforeWebDriver.Options.getCookieNamed(String)
- Parameters:
options
- - options to get cookie fromname
- - name of the cookie to get
-
afterGetCookieNamed
This action will be performed each time afterWebDriver.Options.getCookieNamed(String)
- Parameters:
options
- - options to get cookie fromname
- - name of the cookie to getresult
- - cookie with the given name
-
beforeAnyTimeoutsCall
This method will be called before any method of aWebDriver.Timeouts
instance is- Parameters:
timeouts
- The timeouts object that will be calledmethod
- The method that will be calledargs
- The arguments that will be passed to the method
-
afterAnyTimeoutsCall
default void afterAnyTimeoutsCall(WebDriver.Timeouts timeouts, Method method, Object[] args, Object result) This method will be called after any method of aWebDriver.Timeouts
instance is- Parameters:
timeouts
- The timeouts object that will be calledmethod
- The method that will be calledargs
- The arguments that will be passed to the methodresult
- The result of the method call
-
beforeImplicitlyWait
This action will be performed each time beforeWebDriver.Timeouts.implicitlyWait(Duration)
is called.- Parameters:
timeouts
- The timeouts object that will be calledduration
- The duration that will be passed to the method
-
afterImplicitlyWait
This action will be performed each time afterWebDriver.Timeouts.implicitlyWait(Duration)
is called.- Parameters:
timeouts
- The timeouts object that will be calledduration
- The duration that will be passed to the method
-
beforeSetScriptTimeout
This action will be performed each time beforeWebDriver.Timeouts.setScriptTimeout(Duration)
is called.- Parameters:
timeouts
- The timeouts object that will be calledduration
- The duration that will be passed to the method
-
afterSetScriptTimeout
This action will be performed each time afterWebDriver.Timeouts.setScriptTimeout(Duration)
is called.- Parameters:
timeouts
- The timeouts object that will be calledduration
- The duration that will be passed to the method
-
beforePageLoadTimeout
This action will be performed each time beforeWebDriver.Timeouts.pageLoadTimeout(Duration)
is called.- Parameters:
timeouts
- The timeouts object that will be calledduration
- The duration that will be passed to the method
-
afterPageLoadTimeout
This action will be performed each time afterWebDriver.Timeouts.pageLoadTimeout(Duration)
is called.- Parameters:
timeouts
- The timeouts object that will be calledduration
- The duration that will be passed to the method
-
beforeAnyWindowCall
This method will be called before any method of aWebDriver.Window
instance is- Parameters:
window
- The window object that will be calledmethod
- The method that will be calledargs
- The arguments that will be passed to the method
-
afterAnyWindowCall
default void afterAnyWindowCall(WebDriver.Window window, Method method, Object[] args, Object result) This method will be called after any method of aWebDriver.Window
instance is- Parameters:
window
- The window object that will be calledmethod
- The method that will be calledargs
- The arguments that will be passed to the methodresult
- The result of the method call
-
beforeGetSize
This action will be performed each time beforeWebDriver.Window.getSize()
is called.- Parameters:
window
- The window object that will be called
-
afterGetSize
This action will be performed each time afterWebDriver.Window.getSize()
is called.- Parameters:
window
- The window object that will be calledresult
- The result of the method call
-
beforeSetSize
This action will be performed each time beforeWebDriver.Window.setSize(Dimension)
is called.- Parameters:
window
- The window object that will be calledsize
- The size that will be passed to the method
-
afterSetSize
This action will be performed each time afterWebDriver.Window.setSize(Dimension)
is called.- Parameters:
window
- The window object that will be calledsize
- The size that will be passed to the method
-
beforeGetPosition
This action will be performed each time beforeWebDriver.Window.getPosition()
is called.- Parameters:
window
- The window object that will be called
-
afterGetPosition
This action will be performed each time afterWebDriver.Window.getPosition()
is called.- Parameters:
window
- The window object that will be calledresult
- The result of the method call
-
beforeSetPosition
This action will be performed each time beforeWebDriver.Window.setPosition(Point)
is called.- Parameters:
window
- The window object that will be calledposition
- The position that will be passed to the method
-
afterSetPosition
This action will be performed each time afterWebDriver.Window.setPosition(Point)
is called.- Parameters:
window
- The window object that will be calledposition
- The position that will be passed to the method
-
beforeMaximize
This action will be performed each time beforeWebDriver.Window.maximize()
is called.- Parameters:
window
- The window object that will be called
-
afterMaximize
This action will be performed each time afterWebDriver.Window.maximize()
is called.- Parameters:
window
- The window object that will be called
-
beforeFullscreen
This action will be performed each time beforeWebDriver.Window.fullscreen()
is called.- Parameters:
window
- The window object that will be called
-
afterFullscreen
This action will be performed each time afterWebDriver.Window.fullscreen()
is called.- Parameters:
window
- The window object that will be called
-
beforeAnyTargetLocatorCall
default void beforeAnyTargetLocatorCall(WebDriver.TargetLocator targetLocator, Method method, Object[] args) Called before any method inWebDriver.TargetLocator
class.- Parameters:
targetLocator
- the target locator being used for the actionmethod
- the method being invokedargs
- the arguments to the method
-
afterAnyTargetLocatorCall
default void afterAnyTargetLocatorCall(WebDriver.TargetLocator targetLocator, Method method, Object[] args, Object result) Called after any method inWebDriver.TargetLocator
class.- Parameters:
targetLocator
- the target locator being used for the actionmethod
- the method being invokedargs
- the arguments to the methodresult
- the result of the method call
-
beforeFrame
This action will be performed each time beforeWebDriver.TargetLocator.frame(int)
()} is called.- Parameters:
targetLocator
- The target locator being used for the action.index
- The zero-based index.
-
afterFrame
This action will be performed each time afterWebDriver.TargetLocator.frame(int)
()} is called.- Parameters:
targetLocator
- The target locator being used for the action.index
- The zero-based index.
-
beforeFrame
This action will be performed each time beforeWebDriver.TargetLocator.frame(String)
()} is called.- Parameters:
targetLocator
- The target locator being used for the action.nameOrId
- The name of the frame window, the id of the <frame> or <iframe> element, or the (zero-based) index.
-
afterFrame
This action will be performed each time afterWebDriver.TargetLocator.frame(String)
()} is called.- Parameters:
targetLocator
- The target locator being used for the action.nameOrId
- The name of the frame window, the id of the <frame> or <iframe> element, or the (zero-based) index.driver
- The current driver instance.
-
beforeFrame
This action will be performed each time beforeWebDriver.TargetLocator.frame(WebElement)
()} is called.- Parameters:
targetLocator
- The target locator being used for the action.frameElement
- The frame element to switch to.
-
afterFrame
default void afterFrame(WebDriver.TargetLocator targetLocator, WebElement frameElement, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.frame(WebElement)
()} is called.- Parameters:
targetLocator
- The target locator being used for the action.frameElement
- The frame element to switch to.driver
- The current driver instance.
-
beforeParentFrame
This action will be performed each time beforeWebDriver.TargetLocator.parentFrame()
is called.- Parameters:
targetLocator
- The target locator being used for the action.
-
afterParentFrame
This action will be performed each time afterWebDriver.TargetLocator.parentFrame()
is called.- Parameters:
targetLocator
- The target locator being used for the action.driver
- The current driver instance.
-
beforeWindow
This action will be performed each time beforeWebDriver.TargetLocator.window(String)
.- Parameters:
targetLocator
- the target locator being used for the actionnameOrHandle
- The name of the window or the handle as returned byWebDriver.getWindowHandle()
ornull
if switching to a new window created byWebDriver.TargetLocator.newWindow(WindowType)
-
afterWindow
default void afterWindow(WebDriver.TargetLocator targetLocator, String nameOrHandle, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.window(String)
.- Parameters:
targetLocator
- The target locator being used for the action.nameOrHandle
- The name of the window or the handle as returned byWebDriver.getWindowHandle()
ornull
if switching to a new window created byWebDriver.TargetLocator.newWindow(WindowType)
.driver
- The current driver instance.
-
beforeNewWindow
This action will be performed each time beforeWebDriver.TargetLocator.newWindow(WindowType)
is called.- Parameters:
targetLocator
- The target locator being used for the action.typeHint
- The type of new browser window to be created. The created window is not guaranteed to be of the requested type; if the driver does not support the requested type, a new browser window will be created of whatever type the driver does support.
-
afterNewWindow
default void afterNewWindow(WebDriver.TargetLocator targetLocator, WindowType typeHint, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.newWindow(WindowType)
is called.- Parameters:
targetLocator
- The target locator being used for the action.typeHint
- The type of new browser window to be created. The created window is not guaranteed to be of the requested type; if the driver does not support the requested type, a new browser window will be created of whatever type the driver does support.driver
- The current driver instance.
-
beforeDefaultContent
This action will be performed each time beforeWebDriver.TargetLocator.defaultContent()
is called.- Parameters:
targetLocator
- The target locator being used for the action.
-
afterDefaultContent
This action will be performed each time afterWebDriver.TargetLocator.defaultContent()
is called.- Parameters:
targetLocator
- The target locator being used for the action.driver
- The current driver instance.
-
beforeActiveElement
This action will be performed each time beforeWebDriver.TargetLocator.activeElement()
is called.- Parameters:
targetLocator
- The target locator being used for the action.
-
afterActiveElement
This action will be performed each time afterWebDriver.TargetLocator.activeElement()
is called.- Parameters:
targetLocator
- The target locator being used for the action.driver
- The current driver instance.
-
beforeAlert
This action will be performed each time beforeWebDriver.TargetLocator.alert()
is called.- Parameters:
targetLocator
- The target locator being used for the action.
-
afterAlert
This action will be performed each time afterWebDriver.TargetLocator.alert()
is called.- Parameters:
targetLocator
- The target locator being used for the action.alert
- The found alert.
-