-
-
Couldn't load subscription status.
- Fork 8.6k
[java] Add hooks around getScreenshotAs in WebDriverListener #16232 #16233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||
|
Thank you, @giulong for this code suggestion. The support packages contain example code that many users find helpful, but they do not necessarily represent We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
…HQ#16232 WebDriverListener has now default methods for both WebDriver and WebElement for clients to be notified before and after a screenshot is being taken. Fixes SeleniumHQ#16232
d96e9ed to
7f36b75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @giulong!
User description
🔗 Related Issues
Fixes #16232
💥 What does this PR do?
WebDriverListenerhas now default methods for bothWebDriverandWebElementfor clients to be notified before and after a screenshot is being taken.🔄 Types of changes
PR Type
Enhancement
Description
Add screenshot hooks to
WebDriverListenerinterfaceSupport both
WebDriverandWebElementscreenshot eventsInclude before/after methods with target and result parameters
Add comprehensive test coverage for new functionality
Diagram Walkthrough
File Walkthrough
WebDriverListener.java
Add screenshot event hooks to listener interfacejava/src/org/openqa/selenium/support/events/WebDriverListener.java
OutputTypeandTakesScreenshotimportsbeforeGetScreenshotAsandafterGetScreenshotAsmethods forWebDriverbeforeGetScreenshotAsandafterGetScreenshotAsmethods forWebElementEventFiringDecoratorTest.java
Add comprehensive tests for screenshot hooksjava/test/org/openqa/selenium/support/events/EventFiringDecoratorTest.java
OutputTypeandTakesScreenshotWebDriverscreenshot events