-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Feature]: Option to blur activeElement before taking screenshot #34272
Comments
Screenshots are supposed to screenshot the element as it looks. If you need to change the page contents before taking a screenshot, then what you're currently doing is perfectly fine. You can also use |
I can also hide caret by myself and disable animations but to make it easier to use its available via |
The difference is that caret is blinking and animations are non-deterministic. So two test runs might produce two different screenshots because the timing is slightly different, even though the application behaved the same. What element is focused is deterministic though, and it's part of your application's behaviour. So it should be part of the screenshot. |
@Skn0tt Thanks for explanation but... I have a focus set to the input field when animation finishes. And |
🚀 Feature Request
Would be nice to have an option to take screenshot without having focus on any element to avoid situations when some elements has outline.
Now it can be done by calling this before taking a screenshot.
Example
Motivation
This will make tests less flaky when some elements are focused when animation ends or network request is finished.
The text was updated successfully, but these errors were encountered: