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: Set fixed dimensions on absolute images (#39296)
Chris348174eebfbe
diff --git a/docs/src/browsers.md b/docs/src/browsers.mdindex aafa274b5b..847fae5435 100644--- a/docs/src/browsers.md+++ b/docs/src/browsers.md@@ -236,7 +236,7 @@ With the VS Code extension you can run your tests on different browsers by checkTo run tests on multiple projects(browsers), select each project by checking the checkboxes next to the project name.-+<img src="https://github.com/microsoft/playwright/assets/13063165/6dc86ef4-6097-481c-9cab-b6e053ec7ea6" alt="Selecting projects to run tests on" width="3978" height="2294" />### Run tests on different browsers* langs: pythondiff --git a/docs/src/ci-intro.md b/docs/src/ci-intro.mdindex c022f1e4a0..5106049801 100644--- a/docs/src/ci-intro.md+++ b/docs/src/ci-intro.md@@ -187,7 +187,7 @@ Once you have your [GitHub Actions workflow](#setting-up-github-actions) setup,######* langs: csharp-+<img src="https://github.com/microsoft/playwright/assets/13063165/4f1b4cc3-b850-4d60-a99e-24057eaf91ad" alt="dotnet repo on github" width="2802" height="1570" />## Opening the Workflows@@ -196,12 +196,12 @@ Click on the **Actions** tab to see the workflows. Here you see if your tests ha######* langs: js, python, java-+<img src="https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png" alt="opening the workflow" width="1678" height="1207" />######* langs: csharp-+<img src="https://github.com/microsoft/playwright/assets/13063165/71793c09-0815-4faa-866b-85684a1f87e5" alt="opening the workflow" width="2812" height="824" />On Pull Requests you can also click on the **Details** link in the [PR status check](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks).@@ -215,12 +215,12 @@ Clicking on the workflow run shows you all the actions that GitHub performed and######* langs: js, python, java-+<img src="https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png" alt="Viewing Test Logs" width="1678" height="1207" />######* langs: csharp-+<img src="https://github.com/microsoft/playwright/assets/13063165/ba2d8d7b-ffce-42de-95e0-bcb35c421975" alt="viewing the test logs" width="2794" height="1858" />## HTML Report@@ -245,7 +245,7 @@ Locally opening the report does not work as expected as you need a web server fonpx playwright show-report name-of-my-extracted-playwright-report```-+<img src="https://github.com/microsoft/playwright/assets/13063165/c5f60e56-fb75-4a2d-a4b6-054b8c5d69c1" alt="viewing the HTML report" width="2296" height="1424" />To learn more about reports, check out our detailed guide on [HTML Reporter](/test-reporters.md#html-reporter)@@ -254,7 +254,7 @@ To learn more about reports, check out our detailed guide on [HTML Reporter](/teOnce you have served the report using `npx playwright show-report`, click on the trace icon next to the test's file name as seen in the image above. You can then view the trace of your tests and inspect each action to try to find out why the tests are failing.-+<img src="https://github.com/microsoft/playwright/assets/13063165/10fe3585-8401-4051-b1c2-b2e92ac4c274" alt="playwright trace viewer" width="3598" height="2218" />## Viewing the Trace* langs: python, javadiff --git a/docs/src/codegen.md b/docs/src/codegen.mdindex 8cafd449c5..767329644a 100644--- a/docs/src/codegen.md+++ b/docs/src/codegen.md@@ -27,25 +27,25 @@ To record a test click on the **Record new** button from the Testing sidebar. ThIn the browser go to the URL you wish to test and start clicking around to record your user actions.-+<img src="https://github.com/microsoft/playwright/assets/13063165/1d4c8f37-8325-4816-a665-d0e95e63f509" alt="generating user actions" width="2788" height="1824" />Playwright will record your actions and generate the test code directly in VS Code. You can also generate assertions by choosing one of the icons in the toolbar and then clicking on an element on the page to assert against. The following assertions can be generated:* `'assert visibility'` to assert that an element is visible* `'assert text'` to assert that an element contains specific text* `'assert value'` to assert that an element has a specific value-+<img src="https://github.com/microsoft/playwright/assets/13063165/d131eb35-b2ca-4bf4-a8ac-88b6e40dcf07" alt="generating assertions" width="2788" height="1400" />Once you are done recording click the **cancel** button or close the browser window. You can then inspect your `test-1.spec.ts` file and manually improve it if needed.-+<img src="https://github.com/microsoft/playwright/assets/13063165/2ba4c212-4713-460a-b054-6dc6b67a9a7c" alt="code from a generated test" width="3126" height="1654" />### Record at CursorTo record from a specific point in your test move your cursor to where you want to record more actions and then click the **Record at cursor** button from the Testing sidebar. If your browser window is not already open then first run the test with 'Show browser' checked and then click the **Record at cursor** button.-+<img src="https://github.com/microsoft/playwright/assets/13063165/77948ab8-92a2-435f-9833-0944da5ae664" alt="record at cursor in vs code" width="3126" height="1756" />In the browser window start performing the actions you want to record.@@ -54,7 +54,7 @@ In the browser window start performing the actions you want to record.In the test file in VS Code you will see your new generated actions added to your test at the cursor position.-+<img src="https://github.com/microsoft/playwright/assets/13063165/4f4bb34e-9cda-41fe-bf65-8d8016d84c7f" alt="code from a generated test" width="3180" height="1944" />### Generating locators@@ -103,22 +103,22 @@ With the test generator you can record:######* langs: js-+<img src="https://github.com/microsoft/playwright/assets/13063165/34a79ea1-639e-4cb3-8115-bfdc78e3d34d" alt="Recording a test" width="2788" height="1824" />######* langs: java-+<img src="https://github.com/microsoft/playwright/assets/13063165/ec9c4071-4af8-4ae7-8b36-aebcc29bdbbb" alt="recording a test" width="2788" height="1824" />######* langs: python-+<img src="https://github.com/microsoft/playwright/assets/13063165/9751b609-6e4c-486b-a961-f86f177b1d58" alt="recording a test" width="2788" height="1824" />######* langs: csharp-+<img src="https://github.com/microsoft/playwright/assets/13063165/53bdfb6f-d462-4ce0-ab95-0619faaebf1e" alt="recording a test" width="2788" height="1824" />######* langs: js, java, python, csharp@@ -138,22 +138,22 @@ You can generate [locators](/locators.md) with the test generator.######* langs: js-+<img src="https://github.com/microsoft/playwright/assets/13063165/2c8a12e2-4e98-4fdd-af92-1d73ae696d86" alt="picking a locator" width="2788" height="1824" />######* langs: java-+<img src="https://github.com/microsoft/playwright/assets/13063165/733b48fd-5edf-4150-93f0-018adc52b6ff" alt="picking a locator" width="2700" height="1736" />######* langs: python-+<img src="https://github.com/microsoft/playwright/assets/13063165/95d11f48-96a4-46b9-9c2a-63c3aa4fdce7" alt="picking a locator" width="2788" height="1824" />######* langs: csharp-+<img src="https://github.com/microsoft/playwright/assets/13063165/1478f56f-422f-4276-9696-0674041f11dc" alt="picking a locator" width="2788" height="1824" />## Emulationdiff --git a/docs/src/library-python.md b/docs/src/library-python.mdindex 605cb9798f..a3702962b0 100644--- a/docs/src/library-python.md+++ b/docs/src/library-python.md@@ -7,7 +7,7 @@ title: "Getting started - Library"### Pip-[](https://pypi.python.org/pypi/playwright/)+[<img src="https://badge.fury.io/py/playwright.svg" alt="PyPI version" width="132" height="20" />](https://pypi.python.org/pypi/playwright/)```bashpip install --upgrade pip@@ -17,7 +17,7 @@ playwright install### Conda-[](https://anaconda.org/Microsoft/playwright)+[<img src="https://img.shields.io/conda/v/microsoft/playwright" alt="Anaconda version" width="160" height="20" />](https://anaconda.org/Microsoft/playwright)```bashconda config --add channels conda-forgediff --git a/docs/src/mock.md b/docs/src/mock.mdindex eab111fd3d..aa0738fa1a 100644--- a/docs/src/mock.md+++ b/docs/src/mock.md@@ -99,7 +99,7 @@ assertThat(page.getByText("Strawberry")).isVisible();```You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data.-+<img src="https://github.com/microsoft/playwright/assets/13063165/3dc14cbf-c100-4efc-ac21-d7b52d698b53" alt="api mocking trace" width="2946" height="1902" />Read more about [advanced networking](./network.md).@@ -210,10 +210,10 @@ assertThat(page.getByText("Loquat", new Page.GetByTextOptions().setExact(true)))```In the trace of our test we can see that the API was called and the response was modified.-+<img src="https://github.com/microsoft/playwright/assets/13063165/8b8dd82d-1b3e-428e-871b-840581fed439" alt="trace of test showing api being called and fulfilled" width="2946" height="1902" />By inspecting the response we can see that our new fruit was added to the list.-+<img src="https://github.com/microsoft/playwright/assets/13063165/03e6c87c-4ecc-47e8-9ca0-30fface25e9d" alt="trace of test showing the mock response" width="2946" height="1902" />Read more about [advanced networking](./network.md).@@ -232,12 +232,12 @@ The options object can contain the URL so that only requests with the URL matchiSetting `update` option to true will create or update the HAR file with the actual network information instead of serving the requests from the HAR file. Use it when creating a test to populate the HAR with real data.-####+####* langs: jsAlternatively, you can also record HAR files by using the [`option: Browser.newContext.recordHar`] option in [`method: Browser.newContext`] when creating a browser context. This allows you to capture all network traffic for the entire context until the context is closed.-####+####* langs: csharp, java, pythonAlternatively, you can also record HAR files by using the [`option: Browser.newContext.recordHarPath`] option in [`method: Browser.newContext`] when creating a browser context. This allows you to capture all network traffic for the entire context until the context is closed.@@ -409,10 +409,10 @@ assertThat(page.getByText("Playwright", new Page.GetByTextOptions().setExact(true))).isVisible();```In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called.-+<img src="https://github.com/microsoft/playwright/assets/13063165/1bd7ab66-ea4f-43c2-a4e5-ca17d4837ff1" alt="trace showing the HAR file being used" width="2946" height="1902" />If we inspect the response we can see our new fruit was added to the JSON, which was done by manually updating the hashed `.txt` file inside the `hars` folder.-+<img src="https://github.com/microsoft/playwright/assets/13063165/db3117fc-7b02-4973-9a51-29e213261a6a" alt="trace showing response from HAR file" width="2946" height="1902" />HAR replay matches URL and HTTP method strictly. For POST requests, it also matches POST payloads strictly. If multiple recordings match a request, the one with the most matching headers is picked. An entry resulting in a redirect will be followed automatically.diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.mdindex 8b91c0a67d..ec6c18a490 100644--- a/docs/src/release-notes-csharp.md+++ b/docs/src/release-notes-csharp.md@@ -150,7 +150,7 @@ This version was also tested against the following stable channels:### Trace Viewer and HTML Reporter Updates- New Steps in Trace Viewer:- + <img src="https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2" alt="New Trace Viewer Steps" width="1562" height="1364" />- New method [`method: Locator.describe`] to describe a locator. Used for trace viewer.```csharpvar button = Page.GetByTestId("btn-sub").Describe("Subscribe button");@@ -428,7 +428,7 @@ The Network tab in the trace viewer has several nice improvements:- better display of query string parameters- preview of font assets-+<img src="https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2" alt="Network tab now has filters" width="1712" height="418" />### Miscellaneous@@ -738,7 +738,7 @@ This version was also tested against the following stable channels:### Test Generator Update-+<img src="https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190" alt="Playwright Test Generator" width="2788" height="1824" />New tools to generate assertions:- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].@@ -797,7 +797,7 @@ This version was also tested against the following stable channels:### Trace Viewer Updates-+<img src="https://github.com/microsoft/playwright/assets/746130/0c41e20d-c54b-4600-8ca8-1cbb6393ddef" alt="Playwright Trace Viewer" width="1091" height="722" />1. Zoom into time range.1. Network panel redesign.@@ -1109,7 +1109,7 @@ This version was also tested against the following stable channels:* **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool.-+<img src="https://user-images.githubusercontent.com/9798949/202293757-2e3ec0ac-1feb-4d6f-9935-73e08658b76d.png" alt="Locator Explorer" width="1650" height="1096" />### New APIs@@ -1580,7 +1580,7 @@ This version was also tested against the following stable channels:Playwright 1.17 introduces [frame locators](./api/class-framelocator) - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the `iframe` and then locate elements in that iframe. Frame locators are strict by default, will wait for `iframe` to appear and can be used in Web-First assertions.-+<img src="https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png" alt="Graphics" width="600" height="237" />Frame locators can be created with either [`method: Page.frameLocator`] or [`method: Locator.frameLocator`] method.@@ -1602,14 +1602,14 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright.- New trace metadata tab with browser details- Snapshots now have URL bar-+<img src="https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png" alt="image" width="2230" height="1562" />### HTML Report Update- HTML report now supports dynamic filtering- Report is now a **single static HTML file** that could be sent by e-mail or as a slack attachment.-+<img src="https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png" alt="image" width="2494" height="1624" />### Ubuntu ARM64 support + morediff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.mdindex 62d9a84369..0e0bc346bb 100644--- a/docs/src/release-notes-java.md+++ b/docs/src/release-notes-java.md@@ -148,7 +148,7 @@ This version was also tested against the following stable channels:### Trace Viewer and HTML Reporter Updates- New Steps in Trace Viewer:- + <img src="https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2" alt="New Trace Viewer Steps" width="1562" height="1364" />- New method [`method: Locator.describe`] to describe a locator. Used for trace viewer.```javaLocator button = page.getByTestId("btn-sub").describe("Subscribe button");@@ -407,7 +407,7 @@ The Network tab in the trace viewer has several nice improvements:- better display of query string parameters- preview of font assets-+<img src="https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2" alt="Network tab now has filters" width="1712" height="418" />### Miscellaneous@@ -782,7 +782,7 @@ This version was also tested against the following stable channels:### Test Generator Update-+<img src="https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190" alt="Playwright Test Generator" width="2788" height="1824" />New tools to generate assertions:- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].@@ -840,7 +840,7 @@ This version was also tested against the following stable channels:### Trace Viewer Updates-+<img src="https://github.com/microsoft/playwright/assets/746130/0c41e20d-c54b-4600-8ca8-1cbb6393ddef" alt="Playwright Trace Viewer" width="1091" height="722" />1. Zoom into time range.1. Network panel redesign.@@ -1167,7 +1167,7 @@ This version was also tested against the following stable channels:* **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool.-+<img src="https://user-images.githubusercontent.com/9798949/202293631-2f402cc2-35fb-4877-8ea1-82265fbbc232.png" alt="Locator Explorer" width="1876" height="1096" />### New APIs@@ -1575,7 +1575,7 @@ Read more in [our documentation](./test-assertions).[Tracing](./api/class-tracing.md) now can embed Java sources to recordedtraces, using new [`setSources`](./api/class-tracing#tracing-start-option-sources) option.-+<img src="https://user-images.githubusercontent.com/746130/150180856-40a7df71-370c-4597-8665-40c77a5e06ad.png" alt="tracing-java-sources" width="1517" height="856" />### New APIs & changes@@ -1602,7 +1602,7 @@ This version was also tested against the following stable channels:Playwright 1.17 introduces [frame locators](./api/class-framelocator) - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the `iframe` and then locate elements in that iframe. Frame locators are strict by default, will wait for `iframe` to appear and can be used in Web-First assertions.-+<img src="https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png" alt="Graphics" width="600" height="237" />Frame locators can be created with either [`method: Page.frameLocator`] or [`method: Locator.frameLocator`] method.@@ -1624,14 +1624,14 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright.- New trace metadata tab with browser details- Snapshots now have URL bar-+<img src="https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png" alt="image" width="2230" height="1562" />### HTML Report Update- HTML report now supports dynamic filtering- Report is now a **single static HTML file** that could be sent by e-mail or as a slack attachment.-+<img src="https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png" alt="image" width="2494" height="1624" />### Ubuntu ARM64 support + more@@ -1848,7 +1848,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="shThat will open the following GUI:-+<img src="https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png" alt="image" width="2424" height="1544" />π Read more in [trace viewer documentation](./trace-viewer.md).diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.mdindex 84500d13ed..0c99e74516 100644--- a/docs/src/release-notes-js.md+++ b/docs/src/release-notes-js.md@@ -264,7 +264,7 @@ This version was also tested against the following stable channels:### Trace Viewer and HTML Reporter Updates- New Steps in Trace Viewer and HTML reporter:- + <img src="https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2" alt="New Trace Viewer Steps" width="1562" height="1364" />- New option in `'html'` reporter to set the title of a specific test run:```jsimport { defineConfig } from '@playwright/test';@@ -373,7 +373,7 @@ This version was also tested against the following stable channels:New "Copy prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.- + <img src="https://github.com/user-attachments/assets/f3654407-dd6d-4240-9845-0d96df2bf30a" alt="Copy prompt" width="2178" height="1592" />### Filter visible elements@@ -402,7 +402,7 @@ Set option [`property: TestConfig.captureGitInfo`] to capture git information inHTML report will show this information when available:- + <img src="https://github.com/user-attachments/assets/f5b3f6f4-aa08-4a24-816c-7edf33ef0c37" alt="Git information in the report" width="2514" height="406" />### Test Step improvements@@ -657,7 +657,7 @@ The Network tab in the UI mode and trace viewer has several nice improvements:- better display of query string parameters- preview of font assets-+<img src="https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2" alt="Network tab now has filters" width="1712" height="418" />### `--tsconfig` CLI option@@ -1060,7 +1060,7 @@ This version was also tested against the following stable channels:### UI Mode Updates-+<img src="https://github.com/microsoft/playwright/assets/9881434/61ca7cfc-eb7a-4305-8b62-b6c9f098f300" alt="Playwright UI Mode" width="2304" height="1492" />* See tags in the test list.* Filter by tags by typing `@fast` or clicking on the tag itself.@@ -1193,7 +1193,7 @@ This version was also tested against the following stable channels:### Test Generator Update-+<img src="https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190" alt="Playwright Test Generator" width="2788" height="1824" />New tools to generate assertions:- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].@@ -1353,7 +1353,7 @@ This version was also tested against the following stable channels:### UI Mode Updates-+<img src="https://github.com/microsoft/playwright/assets/746130/8ba27be0-58fd-4f62-8561-950480610369" alt="Playwright UI Mode" width="1230" height="722" />1. Zoom into time range.1. Network panel redesign.@@ -1513,11 +1513,11 @@ This version was also tested against the following stable channels:* UI mode is now available in VSCode Playwright extension via a new "Show trace viewer" button:- + <img src="https://github.com/microsoft/playwright/assets/746130/13094128-259b-477a-8bbb-c1181178e8a2" alt="Playwright UI Mode" width="1274" height="722" />* UI mode and trace viewer mark network requests handled with [`method: Page.route`] and [`method: BrowserContext.route`] handlers, as well as those issued via the [API testing](./api-testing):- + <img src="https://github.com/microsoft/playwright/assets/746130/0df2d4b6-faa3-465c-aff3-c435b430bfe1" alt="Trace Viewer" width="1970" height="1204" />* New option `maskColor` for methods [`method: Page.screenshot`], [`method: Locator.screenshot`], [`method: PageAssertions.toHaveScreenshot#1`] and [`method: LocatorAssertions.toHaveScreenshot#1`] to change default masking color:```js@@ -1570,7 +1570,7 @@ This version was also tested against the following stable channels:### Highlights* UI Mode now shows steps, fixtures and attachments:- + <img src="https://github.com/microsoft/playwright/assets/746130/1d280419-d79a-4a56-b2dc-54d631281d56" alt="UI Mode attachments" width="2306" height="1754" />* New property [`property: TestProject.teardown`] to specify a project that needs to run after thisand all dependent projects have finished. Teardown is useful to cleanup any resources acquired by this project.@@ -1738,7 +1738,7 @@ This version was also tested against the following stable channels:New [UI Mode](./test-ui-mode.md) lets you explore, run and debug tests. Comes with a built-in watch mode.-+<img src="https://user-images.githubusercontent.com/746130/227004851-3901a691-4f8e-43d6-8d6b-cbfeafaeb999.png" alt="Playwright UI Mode" width="2784" height="1824" />Engage with a new flag `--ui`:@@ -1993,16 +1993,16 @@ This version was also tested against the following stable channels:* **Record at Cursor in VSCode.** You can run the test, position the cursor at the end of the test and continue generating the test.-+<img src="https://user-images.githubusercontent.com/746130/202005839-aba2eeba-217b-424d-8496-8b4f5fa72f41.png" alt="New VSCode Extension" width="2704" height="1814" />* **Live Locators in VSCode.** You can hover and edit locators in VSCode to get them highlighted in the opened browser.* **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool.-+<img src="https://user-images.githubusercontent.com/746130/201796876-01567a0b-ca61-4a9d-b12b-04786c471671.png" alt="Locator Explorer" width="1382" height="1090" />* **Codegen and Trace Viewer Dark Theme.** Automatically picked up from operating system settings.-+<img src="https://user-images.githubusercontent.com/746130/201797969-603f74df-d7cf-4c56-befd-798dbd269796.png" alt="Dark Theme" width="2418" height="1726" />### Test Runner@@ -2179,7 +2179,7 @@ This version was also tested against the following stable channels:* Pick selector.* Record new test from current page state.-+<img src="https://user-images.githubusercontent.com/746130/183781999-1b9fdbc5-cfae-47d6-b4f7-5d4ae89716a8.jpg" alt="vscode extension screenshot" width="2560" height="1039" />### Test Runner@@ -2859,7 +2859,7 @@ This version was also tested against the following stable channels:Playwright 1.17 introduces [frame locators](./api/class-framelocator) - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the `iframe` and then locate elements in that iframe. Frame locators are strict by default, will wait for `iframe` to appear and can be used in Web-First assertions.-+<img src="https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png" alt="Graphics" width="600" height="237" />Frame locators can be created with either [`method: Page.frameLocator`] or [`method: Locator.frameLocator`] method.@@ -2881,14 +2881,14 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright.- New trace metadata tab with browser details- Snapshots now have URL bar-+<img src="https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png" alt="image" width="2230" height="1562" />### HTML Report Update- HTML report now supports dynamic filtering- Report is now a **single static HTML file** that could be sent by e-mail or as a slack attachment.-+<img src="https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png" alt="image" width="2494" height="1624" />### Ubuntu ARM64 support + more@@ -2994,7 +2994,7 @@ $ npx playwright test --reporter=htmlThe HTML reporter has all the information about tests and their failures, including surfacingtrace and image artifacts.-+<img src="https://user-images.githubusercontent.com/746130/138324311-94e68b39-b51a-4776-a446-f60037a77f32.png" alt="html reporter" width="720" height="1536" />Read more about [our reporters](./test-reporters#html-reporter).@@ -3378,7 +3378,7 @@ npx playwright show-trace trace.zipThat will open the following GUI:-+<img src="https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png" alt="image" width="2424" height="1544" />π Read more in [trace viewer documentation](./trace-viewer.md).diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.mdindex 806d7621ea..419f011282 100644--- a/docs/src/release-notes-python.md+++ b/docs/src/release-notes-python.md@@ -150,7 +150,7 @@ This version was also tested against the following stable channels:### Trace Viewer and HTML Reporter Updates- New Steps in Trace Viewer:- + <img src="https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2" alt="New Trace Viewer Steps" width="1562" height="1364" />- New method [`method: Locator.describe`] to describe a locator. Used for trace viewer.```pythonbutton = page.get_by_test_id("btn-sub").describe("Subscribe button")@@ -411,7 +411,7 @@ The Network tab in the trace viewer has several nice improvements:- better display of query string parameters- preview of font assets-+<img src="https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2" alt="Network tab now has filters" width="1712" height="418" />### Miscellaneous@@ -697,7 +697,7 @@ This version was also tested against the following stable channels:### Test Generator Update-+<img src="https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190" alt="Playwright Test Generator" width="2788" height="1824" />New tools to generate assertions:- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].@@ -758,7 +758,7 @@ This version was also tested against the following stable channels:### Trace Viewer Updates-+<img src="https://github.com/microsoft/playwright/assets/746130/0c41e20d-c54b-4600-8ca8-1cbb6393ddef" alt="Playwright Trace Viewer" width="1091" height="722" />1. Zoom into time range.1. Network panel redesign.@@ -1081,7 +1081,7 @@ This version was also tested against the following stable channels:* **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool.-+<img src="https://user-images.githubusercontent.com/9798949/202293514-8e2eade6-c809-4b0a-864b-899dfcee3d84.png" alt="Locator Explorer" width="1424" height="1096" />### New APIs@@ -1387,7 +1387,7 @@ Note that the new methods [`method: Page.routeFromHAR`] and [`method: BrowserCon- Codegen now supports generating Pytest Tests- + <img src="https://user-images.githubusercontent.com/746130/168098384-40784024-6c26-4426-8255-e714862af6fc.png" alt="Graphics" width="1424" height="1090" />@@ -1583,7 +1583,7 @@ This version was also tested against the following stable channels:Playwright 1.17 introduces [frame locators](./api/class-framelocator) - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the `iframe` and then locate elements in that iframe. Frame locators are strict by default, will wait for `iframe` to appear and can be used in Web-First assertions.-+<img src="https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png" alt="Graphics" width="600" height="237" />Frame locators can be created with either [`method: Page.frameLocator`] or [`method: Locator.frameLocator`] method.@@ -1605,14 +1605,14 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright.- New trace metadata tab with browser details- Snapshots now have URL bar-+<img src="https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png" alt="image" width="2230" height="1562" />### HTML Report Update- HTML report now supports dynamic filtering- Report is now a **single static HTML file** that could be sent by e-mail or as a slack attachment.-+<img src="https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png" alt="image" width="2494" height="1624" />### Ubuntu ARM64 support + more@@ -1835,7 +1835,7 @@ playwright show-trace trace.zipThat will open the following GUI:-+<img src="https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png" alt="image" width="2424" height="1544" />π Read more in [trace viewer documentation](./trace-viewer.md).diff --git a/docs/src/running-tests-csharp.md b/docs/src/running-tests-csharp.mdindex 1711355410..b9f2ae5c56 100644--- a/docs/src/running-tests-csharp.md+++ b/docs/src/running-tests-csharp.md@@ -177,7 +177,7 @@ $env:PWDEBUG=1dotnet test```-+<img src="https://github.com/microsoft/playwright/assets/13063165/a1e758d3-d379-414f-be0b-7339f12bb635" alt="debugging tests with playwright inspector" width="2700" height="1736" />Check out our [debugging guide](./debug.md) to learn more about the [Playwright Inspector](./debug.md#playwright-inspector) as well as debugging with [Browser Developer tools](./debug.md#browser-developer-tools).diff --git a/docs/src/running-tests-python.md b/docs/src/running-tests-python.mdindex 6aca52060f..8ea161503f 100644--- a/docs/src/running-tests-python.md+++ b/docs/src/running-tests-python.md@@ -131,7 +131,7 @@ This command will open up a Browser window as well as the Playwright Inspector.While debugging you can use the Pick Locator button to select an element on the page and see the locator that Playwright would use to find that element. You can also edit the locator and see it highlighting live on the Browser window. Use the Copy Locator button to copy the locator to your clipboard and then paste it into your test.-+<img src="https://github.com/microsoft/playwright/assets/13063165/c94c89c8-f945-460c-a653-7809c6ca50ee" alt="Playwright Inspector" width="2060" height="1384" />Check out our [debugging guide](./debug.md) to learn more about the [Playwright Inspector](./debug.md#playwright-inspector) as well as debugging with [Browser Developer tools](./debug.md#browser-developer-tools).diff --git a/docs/src/test-ui-mode-js.md b/docs/src/test-ui-mode-js.mdindex a097daa0dd..fddf7e17f5 100644--- a/docs/src/test-ui-mode-js.md+++ b/docs/src/test-ui-mode-js.md@@ -26,90 +26,90 @@ npx playwright test --uiOnce you launch UI Mode you will see a list of all your test files. You can run all your tests by clicking the triangle icon in the sidebar. You can also run a single test file, a block of tests or a single test by hovering over the name and clicking on the triangle next to it.-+<img src="https://github.com/microsoft/playwright/assets/13063165/6b87712f-64a5-4d73-a91d-6562b864712c" alt="running tests in ui mode" width="3960" height="2326" />## Filtering testsFilter tests by text or `@tag` or by passed, failed or skipped tests. You can also filter by [projects](./test-projects) as set in your `playwright.config` file. If you are using project dependencies make sure to run your setup tests first before running the tests that depend on them. The UI mode will not take into consideration the setup tests and therefore you will have to manually run them first.-+<img src="https://github.com/microsoft/playwright/assets/13063165/6f05e589-036d-45d5-9078-38134e1261e4" alt="filtering tests in ui mode" width="3960" height="2326" />## Timeline viewAt the top of the trace you can see a timeline view of your test with different colors to highlight navigation and actions. Hover back and forth to see an image snapshot for each action. Double click on an action to see the time range for that action. You can use the slider in the timeline to increase the actions selected and these will be shown in the Actions tab and all console logs and network logs will be filtered to only show the logs for the actions selected.-+<img src="https://github.com/microsoft/playwright/assets/13063165/811a9985-32aa-4a3e-9869-de32053cf468" alt="timeline view in ui mode" width="3960" height="2326" />## ActionsIn the Actions tab you can see what locator was used for every action and how long each one took to run. Hover over each action of your test and visually see the change in the DOM snapshot. Go back and forward in time and click an action to inspect and debug. Use the Before and After tabs to visually see what happened before and after the action.-+<img src="https://github.com/microsoft/playwright/assets/13063165/7b22fab5-7346-4b98-8fdd-a78ed280647f" alt="use before and after actions in ui mode" width="3960" height="2326" />## Pop out and inspect the DOMPop out the DOM snapshot into its own window for a better debugging experience by clicking on the pop out icon above the DOM snapshot. From there you can open the browser DevTools and inspect the HTML, CSS, Console etc. Go back to UI Mode and click on another action and pop that one out to easily compare the two side by side or debug each individually.-+<img src="https://github.com/microsoft/playwright/assets/13063165/f9f43a0c-78d7-4574-9a58-c69d2ec53c8f" alt="pop out dom snapshot in ui mode" width="3958" height="2322" />## Pick locatorClick on the pick locator button and hover over the DOM snapshot to see the locator for each element highlighted as you hover. Click on an element to add the locator playground. You can modify the locator in the playground and see if your modified locator matches any locators in the DOM snapshot. Once you are satisfied with the locator you can use the copy button to copy the locator and paste it into your test.-+<img src="https://github.com/microsoft/playwright/assets/13063165/9e7eeb84-bd26-4010-8614-75e24b56c716" alt="pick locator in ui mode" width="3960" height="2326" />## SourceAs you hover over each action of your test the line of code for that action is highlighted in the source panel. The button "Open in VSCode" is at the top-right of this section. Upon clicking the button, it will open your test in VS Code right at the line of code that you clicked on.-+<img src="https://github.com/microsoft/playwright/assets/13063165/49b9fa2a-8a57-4044-acaa-0a2ea4784c5c" alt="showing source code of tests in ui mode" width="3958" height="2322" />## CallThe call tab shows you information about the action such as the time it took, what locator was used, if in strict mode and what key was used.-+<img src="https://github.com/microsoft/playwright/assets/13063165/442314c3-0b16-4400-bf25-c198f8654849" alt="showing call tab in ui mode" width="3958" height="2322" />## LogSee a full log of your test to better understand what Playwright is doing behind the scenes such as scrolling into view, waiting for element to be visible, enabled and stable and performing actions such as click, fill, press etc.-+<img src="https://github.com/microsoft/playwright/assets/13063165/1d214ee5-2c07-414d-a342-f88d0864ac89" alt="showing log of tests in ui mode" width="3958" height="2322" />## ErrorsIf your test fails you will see the error messages for each test in the Errors tab. The timeline will also show a red line highlighting where the error occurred. You can also click on the source tab to see on which line of the source code the error is.-+<img src="https://github.com/microsoft/playwright/assets/13063165/ffca2fd1-5349-41fb-ade9-ace143bb2c58" alt="showing errors in ui mode" width="3958" height="2322" />## ConsoleSee console logs from the browser as well as from your test. Different icons are displayed to show you if the console log came from the browser or from the test file.-+<img src="https://github.com/microsoft/playwright/assets/13063165/b6a44763-da04-4152-bbac-3369ca4a60ac" alt="showing console logs from tests in ui mode" width="3958" height="2322" />## NetworkThe Network tab shows you all the network requests that were made during your test. You can sort by different types of requests, status code, method, request, content type, duration and size. Click on a request to see more information about it such as the request headers, response headers, request body and response body.-+<img src="https://github.com/microsoft/playwright/assets/13063165/946c2722-447a-4005-9518-b4e9b73a8240" alt="showing network requests from tests in ui mode" width="3958" height="2322" />## AttachmentsThe "Attachments" tab allows you to explore attachments. If you're doing [visual regression testing](./test-snapshots.md), you'll be able to compare screenshots by examining the image diff, the actual image and the expected image. When you click on the expected image you can use the slider to slide one image over the other so you can easily see the differences in your screenshots.-+<img src="https://github.com/microsoft/playwright/assets/13063165/bb83b406-84ed-4380-a96c-0e62d1388093" alt="ui mode with attachments" width="3606" height="2228" />## MetadataNext to the Actions tab you will find the Metadata tab which will show you more information on your test such as the Browser, viewport size, test duration and more.-+<img src="https://github.com/microsoft/playwright/assets/13063165/befff46e-381a-41c2-8259-e47442add425" alt="metadata tab in ui mode" width="3958" height="2322" />## Watch modeNext to the name of each test in the sidebar you will find an eye icon. Clicking on the icon will activate watch mode which will re-run the test when you make changes to it. You can watch a number of tests at the same time be clicking the eye icon next to each one or all tests by clicking the eye icon at the top of the sidebar.-+<img src="https://github.com/microsoft/playwright/assets/13063165/20d7d44c-b52d-43ff-8871-8b828671f3da" alt="watch mode in ui mode" width="3960" height="2326" />## Docker & GitHub Codespacesdiff --git a/docs/src/trace-viewer-intro-csharp.md b/docs/src/trace-viewer-intro-csharp.mdindex 885a92eab2..ea91452fc1 100644--- a/docs/src/trace-viewer-intro-csharp.md+++ b/docs/src/trace-viewer-intro-csharp.md@@ -254,7 +254,7 @@ You can open the saved trace using the Playwright CLI or in your browser on [`trpwsh bin/Debug/net8.0/playwright.ps1 show-trace bin/Debug/net8.0/playwright-traces/PlaywrightTests.ExampleTest.GetStartedLink.zip```-+<img src="https://github.com/microsoft/playwright/assets/13063165/4372d661-5bfa-4e1f-be65-0d2fe165a75c" alt="playwright trace viewer dotnet" width="3436" height="2106" />Check out our detailed guide on [Trace Viewer](/trace-viewer.md) to learn more about the trace viewer and how to setup your tests to record a trace only when the test fails.diff --git a/docs/src/trace-viewer-intro-java-python.md b/docs/src/trace-viewer-intro-java-python.mdindex 79a415e54a..008c4cc952 100644--- a/docs/src/trace-viewer-intro-java-python.md+++ b/docs/src/trace-viewer-intro-java-python.md@@ -62,7 +62,7 @@ context.tracing.stop(path = "trace.zip")## Recording a trace* langs: java-+Traces can be recorded using the [`property: BrowserContext.tracing`] API as follows:```java@@ -101,7 +101,7 @@ playwright show-trace trace.zip######* langs: python, java-+<img src="https://github.com/microsoft/playwright/assets/13063165/10fe3585-8401-4051-b1c2-b2e92ac4c274" alt="playwright trace viewer" width="3598" height="2218" />To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.md).diff --git a/docs/src/trace-viewer.md b/docs/src/trace-viewer.mdindex 9e17b2985a..42e89067be 100644--- a/docs/src/trace-viewer.md+++ b/docs/src/trace-viewer.md@@ -688,7 +688,7 @@ public class WithTestNameAttribute : BeforeAfterTestAttributeIn the Actions tab you can see what locator was used for every action and how long each one took to run. Hover over each action of your test and visually see the change in the DOM snapshot. Go back and forward in time and click an action to inspect and debug. Use the Before and After tabs to visually see what happened before and after the action.-+<img src="https://github.com/microsoft/playwright/assets/13063165/948b65cd-f0fd-4c7f-8e53-2c632b5a07f1" alt="actions tab in trace viewer" width="3598" height="2218" />**Selecting each action reveals:**- Action snapshots@@ -701,7 +701,7 @@ When tracing with the [`option: Tracing.start.screenshots`] option turned on (deDouble click on an action to see the time range for that action. You can use the slider in the timeline to increase the actions selected and these will be shown in the Actions tab and all console logs and network logs will be filtered to only show the logs for the actions selected.-+<img src="https://github.com/microsoft/playwright/assets/13063165/b04a7d75-54bb-4ab2-9e30-e76f6f74a2c8" alt="timeline view in trace viewer" width="3598" height="2218" />### Snapshots@@ -716,7 +716,7 @@ When tracing with the [`option: Tracing.start.snapshots`] option turned on (defaHere is what the typical Action snapshot looks like:-+<img src="https://github.com/microsoft/playwright/assets/13063165/7168d549-eb0a-4964-9c93-483f03711fa9" alt="action tab in trace viewer" width="3598" height="2218" />Notice how it highlights both, the DOM Node as well as the exact click position.@@ -724,31 +724,31 @@ Notice how it highlights both, the DOM Node as well as the exact click position.When you click on an action in the sidebar, the line of code for that action is highlighted in the source panel.-+<img src="https://github.com/microsoft/playwright/assets/13063165/daa8845d-c250-4923-aa7a-5d040da9adc5" alt="showing source code tab in trace viewer" width="3598" height="2218" />### CallThe call tab shows you information about the action such as the time it took, what locator was used, if in strict mode and what key was used.-+<img src="https://github.com/microsoft/playwright/assets/13063165/95498580-f9dd-4932-a123-c37fe7cfc3c2" alt="showing call tab in trace viewer" width="3598" height="2218" />### LogSee a full log of your test to better understand what Playwright is doing behind the scenes such as scrolling into view, waiting for element to be visible, enabled and stable and performing actions such as click, fill, press etc.-+<img src="https://github.com/microsoft/playwright/assets/13063165/de621461-3bab-4140-b39d-9f02d6672dbf" alt="showing log of tests in trace viewer" width="3598" height="2218" />### ErrorsIf your test fails you will see the error messages for each test in the Errors tab. The timeline will also show a red line highlighting where the error occurred. You can also click on the source tab to see on which line of the source code the error is.-+<img src="https://github.com/microsoft/playwright/assets/13063165/e9ef77b3-05d1-4df2-852c-981023723d34" alt="showing errors in trace viewer" width="3598" height="2218" />### ConsoleSee console logs from the browser as well as from your test. Different icons are displayed to show you if the console log came from the browser or from the test file.-+<img src="https://github.com/microsoft/playwright/assets/13063165/4107c08d-1eaf-421c-bdd4-9dd2aa641d4a" alt="showing log of tests in trace viewer" width="3598" height="2218" />Double click on an action from your test in the actions sidebar. This will filter the console to only show the logs that were made during that action. Click the *Show all* button to see all console logs again.@@ -759,7 +759,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to anThe Network tab shows you all the network requests that were made during your test. You can sort by different types of requests, status code, method, request, content type, duration and size. Click on a request to see more information about it such as the request headers, response headers, request body and response body.-+<img src="https://github.com/microsoft/playwright/assets/13063165/0a3d1671-8ccd-4f7a-a844-35f5eb37f236" alt="network requests tab in trace viewer" width="3598" height="2218" />Double click on an action from your test in the actions sidebar. This will filter the network requests to only show the requests that were made during that action. Click the *Show all* button to see all network requests again.@@ -769,12 +769,12 @@ Use the timeline to filter actions, by clicking a start point and dragging to anNext to the Actions tab you will find the Metadata tab which will show you more information on your test such as the Browser, viewport size, test duration and more.-+<img src="https://github.com/microsoft/playwright/assets/13063165/82ab3d33-1ec9-4b8a-9cf2-30a6e2d59091" alt="meta data in trace viewer" width="3598" height="2218" />### Attachments* langs: jsThe "Attachments" tab allows you to explore attachments. If you're doing [visual regression testing](./test-snapshots.md), you'll be able to compare screenshots by examining the image diff, the actual image and the expected image. When you click on the expected image you can use the slider to slide one image over the other so you can easily see the differences in your screenshots.-+<img src="https://github.com/microsoft/playwright/assets/13063165/4386178a-5808-4fa8-9436-315350a23b04" alt="attachments tab in trace viewer" width="3598" height="2218" />