-  
 -   Notifications  
You must be signed in to change notification settings  - Fork 8.6k
 
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsI-enhancementSomething could be betterSomething could be better
Description
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
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsI-enhancementSomething could be betterSomething could be better