Class AbstractWebDriverEventListener
java.lang.Object
org.openqa.selenium.support.events.AbstractWebDriverEventListener
- All Implemented Interfaces:
WebDriverEventListener
@Deprecated
public abstract class AbstractWebDriverEventListener
extends Object
implements WebDriverEventListener
Deprecated.
Use this class as base class, if you want to implement a
WebDriverEventListener and are
only interested in some events. All methods provided by this class have an empty method body.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAlertAccept(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, 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, 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(String url, org.openqa.selenium.WebDriver driver) Deprecated.Called afterget(String url)respectivelynavigate().to(String url).voidafterScript(String script, org.openqa.selenium.WebDriver driver) Deprecated.Called afterRemoteWebDriver.executeScript(String, Object...).voidafterSwitchToWindow(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, 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(String url, org.openqa.selenium.WebDriver driver) Deprecated.Called beforeget(String url)respectivelynavigate().to(String url).voidbeforeScript(String script, org.openqa.selenium.WebDriver driver) Deprecated.Called beforeRemoteWebDriver.executeScript(String, Object...)voidbeforeSwitchToWindow(String windowName, org.openqa.selenium.WebDriver driver) Deprecated.This action will be performed each time beforeWebDriver.TargetLocator.window(String)voidonException(Throwable throwable, org.openqa.selenium.WebDriver driver) Deprecated.Called whenever an exception would be thrown.
-
Constructor Details
-
AbstractWebDriverEventListener
public AbstractWebDriverEventListener()Deprecated.
-
-
Method Details
-
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
-
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, 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, 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
Deprecated.Description copied from interface:WebDriverEventListenerCalled beforeRemoteWebDriver.executeScript(String, Object...)- Specified by:
beforeScriptin interfaceWebDriverEventListener- Parameters:
script- the script to be executeddriver- WebDriver
-
afterScript
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
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
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
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, 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
-