You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Locator.blur(): https://playwright.dev/docs/api/class-locator#locator-blur.
Adding a config option for this would not be composable.
I can also hide caret by myself and disable animations but to make it easier to use its available via toHaveScreenshot config. Why blur element doesn't fit, how its different?
🚀 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: