Description
I'd like to be notified via an EventFiringDecorator before and after taking a screenshot. The current implementation of WebDriverListener lacks the methods around TakesScreenshot.getScreenshotAs for both the WebDriver and WebElement, though.
I'd like to be able to implement WebDriverListener and hook around screenshots like:
public class MyWebDriverListener implements WebDriverListener {
@Override
public <X> void beforeGetScreenshotAs(WebDriver driver, OutputType<X> target) {
// custom logic
}
@Override
public <X> void afterGetScreenshotAs(WebDriver driver, OutputType<X> target, X result) {
// custom logic
}
@Override
public <X> void beforeGetScreenshotAs(WebElement element, OutputType<X> target) {
// custom logic
}
@Override
public <X> void afterGetScreenshotAs(WebElement element, OutputType<X> target, X result) {
// custom logic
}
}
Have you considered any alternatives or workarounds?
No response
Description
I'd like to be notified via an
EventFiringDecoratorbefore and after taking a screenshot. The current implementation ofWebDriverListenerlacks the methods aroundTakesScreenshot.getScreenshotAsfor both theWebDriverandWebElement, though.I'd like to be able to implement
WebDriverListenerand hook around screenshots like:Have you considered any alternatives or workarounds?
No response