Class AbstractWebDriverEventListener
- java.lang.Object
-
- org.openqa.selenium.support.events.AbstractWebDriverEventListener
-
- All Implemented Interfaces:
WebDriverEventListener
@Deprecated public abstract class AbstractWebDriverEventListener extends java.lang.Object implements WebDriverEventListener
Deprecated.Use this class as base class, if you want to implement aWebDriverEventListenerand are only interested in some events. All methods provided by this class have an empty method body.
-
-
Constructor Summary
Constructors Constructor Description AbstractWebDriverEventListener()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterAlertAccept(org.openqa.selenium.WebDriver driver)Deprecated.This action will be performed each time afterAlert.accept()voidafterAlertDismiss(org.openqa.selenium.WebDriver driver)Deprecated.This action will be performed each time beforeAlert.dismiss()voidafterChangeValueOf(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver, java.lang.CharSequence[] keysToSend)Deprecated.Called afterWebElement.clear(),WebElement.sendKeys(...)}.voidafterClickOn(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Called afterWebElement.click().voidafterFindBy(org.openqa.selenium.By by, org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Called afterWebDriver.findElement(...), orWebDriver.findElements(...), orWebElement.findElement(...), orWebElement.findElements(...).<X> voidafterGetScreenshotAs(org.openqa.selenium.OutputType<X> target, X screenshot)Deprecated.Called afterTakesScreenshot.getScreenshotAs(OutputType)allows the implementation to determine which type of output was generated and to access the output itselfvoidafterGetText(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver, java.lang.String text)Deprecated.Called right afterWebElement.getText()method is being calledvoidafterNavigateBack(org.openqa.selenium.WebDriver driver)Deprecated.Called afternavigate().back().voidafterNavigateForward(org.openqa.selenium.WebDriver driver)Deprecated.Called afternavigate().forward().voidafterNavigateRefresh(org.openqa.selenium.WebDriver driver)Deprecated.Called afternavigate().refresh().voidafterNavigateTo(java.lang.String url, org.openqa.selenium.WebDriver driver)Deprecated.Called afterget(String url)respectivelynavigate().to(String url).voidafterScript(java.lang.String script, org.openqa.selenium.WebDriver driver)Deprecated.Called afterRemoteWebDriver.executeScript(String, Object...).voidafterSwitchToWindow(java.lang.String windowName, org.openqa.selenium.WebDriver driver)Deprecated.This action will be performed each time afterWebDriver.TargetLocator.window(String)voidbeforeAlertAccept(org.openqa.selenium.WebDriver driver)Deprecated.This action will be performed each time beforeAlert.accept()voidbeforeAlertDismiss(org.openqa.selenium.WebDriver driver)Deprecated.This action will be performed each time afterAlert.dismiss()voidbeforeChangeValueOf(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver, java.lang.CharSequence[] keysToSend)Deprecated.Called beforeWebElement.clear(),WebElement.sendKeys(...).voidbeforeClickOn(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Called beforeWebElement.click().voidbeforeFindBy(org.openqa.selenium.By by, org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Called beforeWebDriver.findElement(...), orWebDriver.findElements(...), orWebElement.findElement(...), orWebElement.findElements(...).<X> voidbeforeGetScreenshotAs(org.openqa.selenium.OutputType<X> target)Deprecated.Called beforeTakesScreenshot.getScreenshotAs(OutputType)allows the implementation to determine which type of output will be generatedvoidbeforeGetText(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Called beforeWebElement.getText()method is being calledvoidbeforeNavigateBack(org.openqa.selenium.WebDriver driver)Deprecated.Called beforenavigate().back().voidbeforeNavigateForward(org.openqa.selenium.WebDriver driver)Deprecated.Called beforenavigate().forward().voidbeforeNavigateRefresh(org.openqa.selenium.WebDriver driver)Deprecated.Called beforenavigate().refresh().voidbeforeNavigateTo(java.lang.String url, org.openqa.selenium.WebDriver driver)Deprecated.Called beforeget(String url)respectivelynavigate().to(String url).voidbeforeScript(java.lang.String script, org.openqa.selenium.WebDriver driver)Deprecated.Called beforeRemoteWebDriver.executeScript(String, Object...)voidbeforeSwitchToWindow(java.lang.String windowName, org.openqa.selenium.WebDriver driver)Deprecated.This action will be performed each time beforeWebDriver.TargetLocator.window(String)voidonException(java.lang.Throwable throwable, org.openqa.selenium.WebDriver driver)Deprecated.Called whenever an exception would be thrown.
-
-
-
Method Detail
-
beforeAlertAccept
public void beforeAlertAccept(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerThis action will be performed each time beforeAlert.accept()- Specified by:
beforeAlertAcceptin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
afterAlertAccept
public void afterAlertAccept(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerThis action will be performed each time afterAlert.accept()- Specified by:
afterAlertAcceptin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
afterAlertDismiss
public void afterAlertDismiss(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerThis action will be performed each time beforeAlert.dismiss()- Specified by:
afterAlertDismissin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
beforeAlertDismiss
public void beforeAlertDismiss(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerThis action will be performed each time afterAlert.dismiss()- Specified by:
beforeAlertDismissin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
beforeNavigateTo
public void beforeNavigateTo(java.lang.String url, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeget(String url)respectivelynavigate().to(String url).- Specified by:
beforeNavigateToin interfaceWebDriverEventListener- Parameters:
url- URLdriver- WebDriver
-
afterNavigateTo
public void afterNavigateTo(java.lang.String url, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled afterget(String url)respectivelynavigate().to(String url). Not called, if an exception is thrown.- Specified by:
afterNavigateToin interfaceWebDriverEventListener- Parameters:
url- URLdriver- WebDriver
-
beforeNavigateBack
public void beforeNavigateBack(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerCalled beforenavigate().back().- Specified by:
beforeNavigateBackin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
afterNavigateBack
public void afterNavigateBack(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerCalled afternavigate().back(). Not called, if an exception is thrown.- Specified by:
afterNavigateBackin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
beforeNavigateForward
public void beforeNavigateForward(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerCalled beforenavigate().forward().- Specified by:
beforeNavigateForwardin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
afterNavigateForward
public void afterNavigateForward(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerCalled afternavigate().forward(). Not called, if an exception is thrown.- Specified by:
afterNavigateForwardin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
beforeNavigateRefresh
public void beforeNavigateRefresh(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerCalled beforenavigate().refresh().- Specified by:
beforeNavigateRefreshin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
afterNavigateRefresh
public void afterNavigateRefresh(org.openqa.selenium.WebDriver driver)
Deprecated.Description copied from interface:WebDriverEventListenerCalled afternavigate().refresh(). Not called, if an exception is thrown.- Specified by:
afterNavigateRefreshin interfaceWebDriverEventListener- Parameters:
driver- WebDriver
-
beforeFindBy
public void beforeFindBy(org.openqa.selenium.By by, org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeWebDriver.findElement(...), orWebDriver.findElements(...), orWebElement.findElement(...), orWebElement.findElements(...).- Specified by:
beforeFindByin interfaceWebDriverEventListener- Parameters:
by- locator being usedelement- will benull, if a find method ofWebDriveris called.driver- WebDriver
-
afterFindBy
public void afterFindBy(org.openqa.selenium.By by, org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled afterWebDriver.findElement(...), orWebDriver.findElements(...), orWebElement.findElement(...), orWebElement.findElements(...).- Specified by:
afterFindByin interfaceWebDriverEventListener- Parameters:
by- locator being usedelement- will benull, if a find method ofWebDriveris called.driver- WebDriver
-
beforeClickOn
public void beforeClickOn(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeWebElement.click().- Specified by:
beforeClickOnin interfaceWebDriverEventListener- Parameters:
element- the WebElement being used for the actiondriver- WebDriver
-
afterClickOn
public void afterClickOn(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled afterWebElement.click(). Not called, if an exception is thrown.- Specified by:
afterClickOnin interfaceWebDriverEventListener- Parameters:
element- the WebElement being used for the actiondriver- WebDriver
-
beforeChangeValueOf
public void beforeChangeValueOf(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver, java.lang.CharSequence[] keysToSend)Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeWebElement.clear(),WebElement.sendKeys(...).- Specified by:
beforeChangeValueOfin interfaceWebDriverEventListener- Parameters:
element- the WebElement being used for the actiondriver- WebDriver
-
afterChangeValueOf
public void afterChangeValueOf(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver, java.lang.CharSequence[] keysToSend)Deprecated.Description copied from interface:WebDriverEventListenerCalled afterWebElement.clear(),WebElement.sendKeys(...)}. Not called, if an exception is thrown.- Specified by:
afterChangeValueOfin interfaceWebDriverEventListener- Parameters:
element- the WebElement being used for the actiondriver- WebDriver
-
beforeScript
public void beforeScript(java.lang.String script, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeRemoteWebDriver.executeScript(String, Object...)- Specified by:
beforeScriptin interfaceWebDriverEventListener- Parameters:
script- the script to be executeddriver- WebDriver
-
afterScript
public void afterScript(java.lang.String script, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled afterRemoteWebDriver.executeScript(String, Object...). Not called if an exception is thrown- Specified by:
afterScriptin interfaceWebDriverEventListener- Parameters:
script- the script that was executeddriver- WebDriver
-
afterSwitchToWindow
public void afterSwitchToWindow(java.lang.String windowName, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerThis action will be performed each time afterWebDriver.TargetLocator.window(String)- Specified by:
afterSwitchToWindowin interfaceWebDriverEventListener- Parameters:
windowName- The name of the window or the handle as returned byWebDriver.getWindowHandle()ornullif switching to a new window created byWebDriver.TargetLocator.newWindow(WindowType)driver- WebDriver
-
beforeSwitchToWindow
public void beforeSwitchToWindow(java.lang.String windowName, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerThis action will be performed each time beforeWebDriver.TargetLocator.window(String)- Specified by:
beforeSwitchToWindowin interfaceWebDriverEventListener- Parameters:
windowName- The name of the window or the handle as returned byWebDriver.getWindowHandle()ornullif switching to a new window created byWebDriver.TargetLocator.newWindow(WindowType)driver- WebDriver
-
onException
public void onException(java.lang.Throwable throwable, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled whenever an exception would be thrown.- Specified by:
onExceptionin interfaceWebDriverEventListener- Parameters:
throwable- the exception that will be throwndriver- WebDriver
-
beforeGetScreenshotAs
public <X> void beforeGetScreenshotAs(org.openqa.selenium.OutputType<X> target)
Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeTakesScreenshot.getScreenshotAs(OutputType)allows the implementation to determine which type of output will be generated- Specified by:
beforeGetScreenshotAsin interfaceWebDriverEventListener- Type Parameters:
X- Return type for getScreenshotAs.- Parameters:
target- target type, @see OutputType
-
afterGetScreenshotAs
public <X> void afterGetScreenshotAs(org.openqa.selenium.OutputType<X> target, X screenshot)Deprecated.Description copied from interface:WebDriverEventListenerCalled afterTakesScreenshot.getScreenshotAs(OutputType)allows the implementation to determine which type of output was generated and to access the output itself- Specified by:
afterGetScreenshotAsin interfaceWebDriverEventListener- Type Parameters:
X- Return type for getScreenshotAs.- Parameters:
target- target type, @see OutputTypescreenshot- screenshot output of the specified type
-
beforeGetText
public void beforeGetText(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeWebElement.getText()method is being called- Specified by:
beforeGetTextin interfaceWebDriverEventListener- Parameters:
element- -WebElementagainst which call is being madedriver- - instance ofWebDriver
-
afterGetText
public void afterGetText(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver, java.lang.String text)Deprecated.Description copied from interface:WebDriverEventListenerCalled right afterWebElement.getText()method is being called- Specified by:
afterGetTextin interfaceWebDriverEventListener- Parameters:
element- -WebElementagainst which call is being madedriver- - instance ofWebDrivertext- -Stringobject extracted from respectiveWebElement
-
-