Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(test): document mouse-outside-viewport screenshot helper (#42446)
Karl Horky1ea94e9c2c4c
diff --git a/docs/src/test-snapshots-js.md b/docs/src/test-snapshots-js.mdindex ed69bbcde2..314dbddd4d 100644--- a/docs/src/test-snapshots-js.md+++ b/docs/src/test-snapshots-js.md@@ -67,6 +67,15 @@ Sometimes you need to update the reference screenshot, for example when the pagenpx playwright test --update-snapshots```+## Hover effects++Screenshots capture any hover effects present in the page at the moment. To avoid hover effects, move the mouse to a position that does not trigger them, or hover an element that has no effects, before taking the screenshot:++```js+await page.mouse.move(-1, -1);+await expect(page).toHaveScreenshot();+```+## Options### maxDiffPixels