From ac82e2345323fd0feb015df02fded3eac35c6f51 Mon Sep 17 00:00:00 2001 From: "microsoft-playwright-automation[bot]" <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:26:08 +0000 Subject: [PATCH] feat(roll): roll to ToT Playwright (25-02-26) --- dotnet/docs/ci-intro.mdx | 6 +-- dotnet/docs/codegen.mdx | 4 +- dotnet/docs/mock.mdx | 20 +++++++--- dotnet/docs/release-notes.mdx | 20 +++++----- dotnet/docs/running-tests.mdx | 2 +- dotnet/docs/trace-viewer-intro.mdx | 2 +- dotnet/docs/trace-viewer.mdx | 20 +++++----- java/docs/ci-intro.mdx | 4 +- java/docs/codegen.mdx | 4 +- java/docs/mock.mdx | 20 +++++++--- java/docs/release-notes.mdx | 24 ++++++------ java/docs/trace-viewer-intro.mdx | 2 +- java/docs/trace-viewer.mdx | 20 +++++----- nodejs/docs/browsers.mdx | 2 +- nodejs/docs/ci-intro.mdx | 8 ++-- nodejs/docs/codegen.mdx | 14 +++---- nodejs/docs/mock.mdx | 20 +++++++--- nodejs/docs/release-notes.mdx | 46 ++++++++++++----------- nodejs/docs/test-ui-mode.mdx | 32 ++++++++-------- nodejs/docs/trace-viewer.mdx | 22 +++++------ python/docs/ci-intro.mdx | 4 +- python/docs/codegen.mdx | 4 +- python/docs/library.mdx | 4 +- python/docs/mock.mdx | 20 +++++++--- python/docs/release-notes.mdx | 24 ++++++------ python/docs/running-tests.mdx | 2 +- python/docs/trace-viewer-intro.mdx | 2 +- python/docs/trace-viewer.mdx | 20 +++++----- src/components/GitHubStarButton/index.tsx | 2 +- 29 files changed, 213 insertions(+), 161 deletions(-) diff --git a/dotnet/docs/ci-intro.mdx b/dotnet/docs/ci-intro.mdx index 58d44445258..fcefd1fca16 100644 --- a/dotnet/docs/ci-intro.mdx +++ b/dotnet/docs/ci-intro.mdx @@ -58,14 +58,14 @@ Looking at the list of steps in `jobs.test.steps`, you can see that the workflow Once you have your [GitHub Actions workflow](#setting-up-github-actions) setup, then all you need to do is [Create a repo on GitHub](https://docs.github.com/en/get-started/quickstart/create-a-repo) or push your code to an existing repository. Follow the instructions on GitHub and don't forget to [initialize a git repository](https://github.com/git-guides/git-init) using the `git init` command so you can [add](https://github.com/git-guides/git-add), [commit](https://github.com/git-guides/git-commit), and [push](https://github.com/git-guides/git-push) your code. ###### -![dotnet repo on github](https://github.com/microsoft/playwright/assets/13063165/4f1b4cc3-b850-4d60-a99e-24057eaf91ad) +dotnet repo on github ## Opening the Workflows Click on the **Actions** tab to see the workflows. Here you see if your tests have passed or failed. ###### -![opening the workflow](https://github.com/microsoft/playwright/assets/13063165/71793c09-0815-4faa-866b-85684a1f87e5) +opening the workflow 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). @@ -76,7 +76,7 @@ On Pull Requests you can also click on the **Details** link in the [PR status ch Clicking on the workflow run shows you all the actions that GitHub performed and clicking on **Run Playwright tests** shows the error messages, what was expected and what was received as well as the call log. ###### -![viewing the test logs](https://github.com/microsoft/playwright/assets/13063165/ba2d8d7b-ffce-42de-95e0-bcb35c421975) +viewing the test logs ## Viewing the Trace diff --git a/dotnet/docs/codegen.mdx b/dotnet/docs/codegen.mdx index 4f8caac25c9..c537b13fff5 100644 --- a/dotnet/docs/codegen.mdx +++ b/dotnet/docs/codegen.mdx @@ -36,7 +36,7 @@ With the test generator you can record: * `'assert value'` to assert that an element has a specific value ###### -![recording a test](https://github.com/microsoft/playwright/assets/13063165/53bdfb6f-d462-4ce0-ab95-0619faaebf1e) +recording a test ###### When you have finished interacting with the page, press the **record** button to stop the recording and use the **copy** button to copy the generated code to your editor. @@ -52,7 +52,7 @@ You can generate [locators](/locators.mdx) with the test generator. * You can then edit the locator in this field to fine tune it or use the copy button to copy it and paste it into your code. ###### -![picking a locator](https://github.com/microsoft/playwright/assets/13063165/1478f56f-422f-4276-9696-0674041f11dc) +picking a locator ## Emulation diff --git a/dotnet/docs/mock.mdx b/dotnet/docs/mock.mdx index cc225a72518..eee19181def 100644 --- a/dotnet/docs/mock.mdx +++ b/dotnet/docs/mock.mdx @@ -32,7 +32,9 @@ await page.GotoAsync("https://demo.playwright.dev/api-mocking"); await Expect(page.GetByTextAsync("Strawberry")).ToBeVisibleAsync(); ``` -You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. ![api mocking trace](https://github.com/microsoft/playwright/assets/13063165/3dc14cbf-c100-4efc-ac21-d7b52d698b53) +You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. + +api mocking trace Read more about [advanced networking](./network.mdx). @@ -63,9 +65,13 @@ await page.GotoAsync("https://demo.playwright.dev/api-mocking"); await Expect(page.GetByTextAsync("Loquat", new () { Exact = true })).ToBeVisibleAsync(); ``` -In the trace of our test we can see that the API was called and the response was modified. ![trace of test showing api being called and fulfilled](https://github.com/microsoft/playwright/assets/13063165/8b8dd82d-1b3e-428e-871b-840581fed439) +In the trace of our test we can see that the API was called and the response was modified. + +trace of test showing api being called and fulfilled + +By inspecting the response we can see that our new fruit was added to the list. -By inspecting the response we can see that our new fruit was added to the list. ![trace of test showing the mock response](https://github.com/microsoft/playwright/assets/13063165/03e6c87c-4ecc-47e8-9ca0-30fface25e9d) +trace of test showing the mock response Read more about [advanced networking](./network.mdx). @@ -135,9 +141,13 @@ await page.GotoAsync("https://demo.playwright.dev/api-mocking"); await page.ExpectByTextAsync("Playwright", new() { Exact = true }).ToBeVisibleAsync(); ``` -In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. ![trace showing the HAR file being used](https://github.com/microsoft/playwright/assets/13063165/1bd7ab66-ea4f-43c2-a4e5-ca17d4837ff1) +In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. + +trace showing the HAR file being used + +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. -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. ![trace showing response from HAR file](https://github.com/microsoft/playwright/assets/13063165/db3117fc-7b02-4973-9a51-29e213261a6a) +trace showing response from HAR file 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/dotnet/docs/release-notes.mdx b/dotnet/docs/release-notes.mdx index c5f2f9c612e..c32582d98dd 100644 --- a/dotnet/docs/release-notes.mdx +++ b/dotnet/docs/release-notes.mdx @@ -42,7 +42,7 @@ This version was also tested against the following stable channels: ### Chrome for Testing -Starting with this release, Playwright switches from Chromium, to using [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57. +Playwright now runs on [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) builds rather than Chromium. Headed mode uses `chrome`; headless mode uses `chrome-headless-shell`. Existing tests should continue to pass after upgrading to v1.57. We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar. @@ -129,7 +129,9 @@ This version was also tested against the following stable channels: ## Version 1.53 ### Trace Viewer and HTML Reporter Updates -- New Steps in Trace Viewer: ![New Trace Viewer Steps](https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2) +- New Steps in Trace Viewer: + + New Trace Viewer Steps - New method [Locator.Describe()](/api/class-locator.mdx#locator-describe) to describe a locator. Used for trace viewer. ```csharp @@ -381,7 +383,7 @@ The Network tab in the trace viewer has several nice improvements: - better display of query string parameters - preview of font assets -![Network tab now has filters](https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2) +Network tab now has filters ### Miscellaneous - The `mcr.microsoft.com/playwright/dotnet:v1.47.0` now serves a Playwright image based on Ubuntu 24.04 Noble. To use the 22.04 jammy-based image, please use `mcr.microsoft.com/playwright/dotnet:v1.47.0-jammy` instead. @@ -668,7 +670,7 @@ This version was also tested against the following stable channels: ### Test Generator Update -![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190) +Playwright Test Generator New tools to generate assertions: - "Assert visibility" tool generates [Expect(Locator).ToBeVisibleAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible). @@ -721,7 +723,7 @@ This version was also tested against the following stable channels: ### Trace Viewer Updates -![Playwright Trace Viewer](https://github.com/microsoft/playwright/assets/746130/0c41e20d-c54b-4600-8ca8-1cbb6393ddef) +Playwright Trace Viewer 1. Zoom into time range. 1. Network panel redesign. @@ -982,7 +984,7 @@ This version was also tested against the following stable channels: ### Playwright Tools * **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool. -![Locator Explorer](https://user-images.githubusercontent.com/9798949/202293757-2e3ec0ac-1feb-4d6f-9935-73e08658b76d.png) +Locator Explorer ### New APIs - [Locator.BlurAsync()](/api/class-locator.mdx#locator-blur) @@ -1406,7 +1408,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. -![Graphics](https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png) +Graphics Frame locators can be created with either [Page.FrameLocator()](/api/class-page.mdx#page-frame-locator) or [Locator.FrameLocator()](/api/class-locator.mdx#locator-frame-locator) method. @@ -1427,13 +1429,13 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright. - New trace metadata tab with browser details - Snapshots now have URL bar -![image](https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png) +image ### 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. -![image](https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png) +image ### Ubuntu ARM64 support + more - Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi. diff --git a/dotnet/docs/running-tests.mdx b/dotnet/docs/running-tests.mdx index a396d776f04..1b1acfed347 100644 --- a/dotnet/docs/running-tests.mdx +++ b/dotnet/docs/running-tests.mdx @@ -237,7 +237,7 @@ dotnet test -![debugging tests with playwright inspector](https://github.com/microsoft/playwright/assets/13063165/a1e758d3-d379-414f-be0b-7339f12bb635) +debugging tests with playwright inspector Check out our [debugging guide](./debug.mdx) to learn more about the [Playwright Inspector](./debug.mdx#playwright-inspector) as well as debugging with [Browser Developer tools](./debug.mdx#browser-developer-tools). diff --git a/dotnet/docs/trace-viewer-intro.mdx b/dotnet/docs/trace-viewer-intro.mdx index ab33e53f7b8..fe608434abc 100644 --- a/dotnet/docs/trace-viewer-intro.mdx +++ b/dotnet/docs/trace-viewer-intro.mdx @@ -253,7 +253,7 @@ You can open the saved trace using the Playwright CLI or in your browser on [`tr pwsh bin/Debug/net8.0/playwright.ps1 show-trace bin/Debug/net8.0/playwright-traces/PlaywrightTests.ExampleTest.GetStartedLink.zip ``` -![playwright trace viewer dotnet](https://github.com/microsoft/playwright/assets/13063165/4372d661-5bfa-4e1f-be65-0d2fe165a75c) +playwright trace viewer dotnet Check out our detailed guide on [Trace Viewer](/trace-viewer.mdx) 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/dotnet/docs/trace-viewer.mdx b/dotnet/docs/trace-viewer.mdx index 3ceb62a5811..1943dbbf331 100644 --- a/dotnet/docs/trace-viewer.mdx +++ b/dotnet/docs/trace-viewer.mdx @@ -517,7 +517,7 @@ public class WithTestNameAttribute : BeforeAfterTestAttribute In 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. -![actions tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/948b65cd-f0fd-4c7f-8e53-2c632b5a07f1) +actions tab in trace viewer **Selecting each action reveals:** - Action snapshots @@ -530,7 +530,7 @@ When tracing with the [Screenshots](/api/class-tracing.mdx#tracing-start-option- 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. -![timeline view in trace viewer](https://github.com/microsoft/playwright/assets/13063165/b04a7d75-54bb-4ab2-9e30-e76f6f74a2c8) +timeline view in trace viewer ### Snapshots @@ -544,7 +544,7 @@ When tracing with the [Snapshots](/api/class-tracing.mdx#tracing-start-option-sn Here is what the typical Action snapshot looks like: -![action tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/7168d549-eb0a-4964-9c93-483f03711fa9) +action tab in trace viewer Notice how it highlights both, the DOM Node as well as the exact click position. @@ -552,31 +552,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. -![showing source code tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/daa8845d-c250-4923-aa7a-5d040da9adc5) +showing source code tab in trace viewer ### Call The 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. -![showing call tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/95498580-f9dd-4932-a123-c37fe7cfc3c2) +showing call tab in trace viewer ### Log See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/de621461-3bab-4140-b39d-9f02d6672dbf) +showing log of tests in trace viewer ### Errors If 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. -![showing errors in trace viewer](https://github.com/microsoft/playwright/assets/13063165/e9ef77b3-05d1-4df2-852c-981023723d34) +showing errors in trace viewer ### Console See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/4107c08d-1eaf-421c-bdd4-9dd2aa641d4a) +showing log of tests in trace viewer 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. @@ -586,7 +586,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an The 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. -![network requests tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/0a3d1671-8ccd-4f7a-a844-35f5eb37f236) +network requests tab in trace viewer 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. @@ -596,7 +596,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an Next 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. -![meta data in trace viewer](https://github.com/microsoft/playwright/assets/13063165/82ab3d33-1ec9-4b8a-9cf2-30a6e2d59091) +meta data in trace viewer [APIRequest]: /api/class-apirequest.mdx "APIRequest" diff --git a/java/docs/ci-intro.mdx b/java/docs/ci-intro.mdx index 494caa884a3..93fb031086a 100644 --- a/java/docs/ci-intro.mdx +++ b/java/docs/ci-intro.mdx @@ -65,14 +65,14 @@ Once you have your [GitHub Actions workflow](#setting-up-github-actions) setup, Click on the **Actions** tab to see the workflows. Here you see if your tests have passed or failed. ###### -![opening the workflow](https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png) +opening the workflow ## Viewing Test Logs Clicking on the workflow run shows you all the actions that GitHub performed and clicking on **Run Playwright tests** shows the error messages, what was expected and what was received as well as the call log. ###### -![Viewing Test Logs](https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png) +Viewing Test Logs ## Viewing the Trace diff --git a/java/docs/codegen.mdx b/java/docs/codegen.mdx index 1d5ec814d2c..44269259764 100644 --- a/java/docs/codegen.mdx +++ b/java/docs/codegen.mdx @@ -36,7 +36,7 @@ With the test generator you can record: * `'assert value'` to assert that an element has a specific value ###### -![recording a test](https://github.com/microsoft/playwright/assets/13063165/ec9c4071-4af8-4ae7-8b36-aebcc29bdbbb) +recording a test ###### When you have finished interacting with the page, press the **record** button to stop the recording and use the **copy** button to copy the generated code to your editor. @@ -52,7 +52,7 @@ You can generate [locators](/locators.mdx) with the test generator. * You can then edit the locator in this field to fine tune it or use the copy button to copy it and paste it into your code. ###### -![picking a locator](https://github.com/microsoft/playwright/assets/13063165/733b48fd-5edf-4150-93f0-018adc52b6ff) +picking a locator ## Emulation diff --git a/java/docs/mock.mdx b/java/docs/mock.mdx index 4e102340503..6a0542092f2 100644 --- a/java/docs/mock.mdx +++ b/java/docs/mock.mdx @@ -33,7 +33,9 @@ page.navigate("https://demo.playwright.dev/api-mocking"); 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. ![api mocking trace](https://github.com/microsoft/playwright/assets/13063165/3dc14cbf-c100-4efc-ac21-d7b52d698b53) +You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. + +api mocking trace Read more about [advanced networking](./network.mdx). @@ -61,9 +63,13 @@ page.navigate("https://demo.playwright.dev/api-mocking"); assertThat(page.getByText("Loquat", new Page.GetByTextOptions().setExact(true))).isVisible(); ``` -In the trace of our test we can see that the API was called and the response was modified. ![trace of test showing api being called and fulfilled](https://github.com/microsoft/playwright/assets/13063165/8b8dd82d-1b3e-428e-871b-840581fed439) +In the trace of our test we can see that the API was called and the response was modified. + +trace of test showing api being called and fulfilled + +By inspecting the response we can see that our new fruit was added to the list. -By inspecting the response we can see that our new fruit was added to the list. ![trace of test showing the mock response](https://github.com/microsoft/playwright/assets/13063165/03e6c87c-4ecc-47e8-9ca0-30fface25e9d) +trace of test showing the mock response Read more about [advanced networking](./network.mdx). @@ -132,9 +138,13 @@ 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. ![trace showing the HAR file being used](https://github.com/microsoft/playwright/assets/13063165/1bd7ab66-ea4f-43c2-a4e5-ca17d4837ff1) +In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. + +trace showing the HAR file being used + +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. -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. ![trace showing response from HAR file](https://github.com/microsoft/playwright/assets/13063165/db3117fc-7b02-4973-9a51-29e213261a6a) +trace showing response from HAR file 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/java/docs/release-notes.mdx b/java/docs/release-notes.mdx index c0e95bb529e..de290a66b0f 100644 --- a/java/docs/release-notes.mdx +++ b/java/docs/release-notes.mdx @@ -42,7 +42,7 @@ This version was also tested against the following stable channels: ### Chrome for Testing -Starting with this release, Playwright switches from Chromium, to using [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57. +Playwright now runs on [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) builds rather than Chromium. Headed mode uses `chrome`; headless mode uses `chrome-headless-shell`. Existing tests should continue to pass after upgrading to v1.57. We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar. @@ -127,7 +127,9 @@ This version was also tested against the following stable channels: ## Version 1.53 ### Trace Viewer and HTML Reporter Updates -- New Steps in Trace Viewer: ![New Trace Viewer Steps](https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2) +- New Steps in Trace Viewer: + + New Trace Viewer Steps - New method [Locator.describe()](/api/class-locator.mdx#locator-describe) to describe a locator. Used for trace viewer. ```java @@ -361,7 +363,7 @@ The Network tab in the trace viewer has several nice improvements: - better display of query string parameters - preview of font assets -![Network tab now has filters](https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2) +Network tab now has filters ### Miscellaneous - The `mcr.microsoft.com/playwright/java:v1.47.0` now serves a Playwright image based on Ubuntu 24.04 Noble. To use the 22.02 jammy-based image, please use `mcr.microsoft.com/playwright/java:v1.47.0-jammy` instead. @@ -710,7 +712,7 @@ This version was also tested against the following stable channels: ### Test Generator Update -![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190) +Playwright Test Generator New tools to generate assertions: - "Assert visibility" tool generates [assertThat(locator).isVisible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible). @@ -762,7 +764,7 @@ This version was also tested against the following stable channels: ### Trace Viewer Updates -![Playwright Trace Viewer](https://github.com/microsoft/playwright/assets/746130/0c41e20d-c54b-4600-8ca8-1cbb6393ddef) +Playwright Trace Viewer 1. Zoom into time range. 1. Network panel redesign. @@ -1038,7 +1040,7 @@ This version was also tested against the following stable channels: ### Playwright Tools * **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool. -![Locator Explorer](https://user-images.githubusercontent.com/9798949/202293631-2f402cc2-35fb-4877-8ea1-82265fbbc232.png) +Locator Explorer ### New APIs - [Locator.blur()](/api/class-locator.mdx#locator-blur) @@ -1399,7 +1401,7 @@ Read more in [our documentation](./test-assertions). [Tracing](./api/class-tracing.mdx) now can embed Java sources to recorded traces, using new [`setSources`](./api/class-tracing#tracing-start-option-sources) option. -![tracing-java-sources](https://user-images.githubusercontent.com/746130/150180856-40a7df71-370c-4597-8665-40c77a5e06ad.png) +tracing-java-sources ### New APIs & changes - [`acceptDownloads`](./api/class-browser#browser-new-context-option-accept-downloads) option now defaults to `true`. @@ -1419,7 +1421,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. -![Graphics](https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png) +Graphics Frame locators can be created with either [Page.frameLocator()](/api/class-page.mdx#page-frame-locator) or [Locator.frameLocator()](/api/class-locator.mdx#locator-frame-locator) method. @@ -1440,13 +1442,13 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright. - New trace metadata tab with browser details - Snapshots now have URL bar -![image](https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png) +image ### 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. -![image](https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png) +image ### Ubuntu ARM64 support + more - Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi. @@ -1644,7 +1646,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="sh That will open the following GUI: -![image](https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png) +image 👉 Read more in [trace viewer documentation](./trace-viewer.mdx). diff --git a/java/docs/trace-viewer-intro.mdx b/java/docs/trace-viewer-intro.mdx index 1110c26c0a2..d741498e120 100644 --- a/java/docs/trace-viewer-intro.mdx +++ b/java/docs/trace-viewer-intro.mdx @@ -47,7 +47,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="sh ``` ###### -![playwright trace viewer](https://github.com/microsoft/playwright/assets/13063165/10fe3585-8401-4051-b1c2-b2e92ac4c274) +playwright trace viewer To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx). diff --git a/java/docs/trace-viewer.mdx b/java/docs/trace-viewer.mdx index 2bf2197014e..ba75839e33e 100644 --- a/java/docs/trace-viewer.mdx +++ b/java/docs/trace-viewer.mdx @@ -72,7 +72,7 @@ This will record the trace and place it into the file named `trace.zip`. In 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. -![actions tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/948b65cd-f0fd-4c7f-8e53-2c632b5a07f1) +actions tab in trace viewer **Selecting each action reveals:** - Action snapshots @@ -85,7 +85,7 @@ When tracing with the [setScreenshots](/api/class-tracing.mdx#tracing-start-opti 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. -![timeline view in trace viewer](https://github.com/microsoft/playwright/assets/13063165/b04a7d75-54bb-4ab2-9e30-e76f6f74a2c8) +timeline view in trace viewer ### Snapshots @@ -99,7 +99,7 @@ When tracing with the [setSnapshots](/api/class-tracing.mdx#tracing-start-option Here is what the typical Action snapshot looks like: -![action tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/7168d549-eb0a-4964-9c93-483f03711fa9) +action tab in trace viewer Notice how it highlights both, the DOM Node as well as the exact click position. @@ -107,31 +107,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. -![showing source code tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/daa8845d-c250-4923-aa7a-5d040da9adc5) +showing source code tab in trace viewer ### Call The 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. -![showing call tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/95498580-f9dd-4932-a123-c37fe7cfc3c2) +showing call tab in trace viewer ### Log See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/de621461-3bab-4140-b39d-9f02d6672dbf) +showing log of tests in trace viewer ### Errors If 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. -![showing errors in trace viewer](https://github.com/microsoft/playwright/assets/13063165/e9ef77b3-05d1-4df2-852c-981023723d34) +showing errors in trace viewer ### Console See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/4107c08d-1eaf-421c-bdd4-9dd2aa641d4a) +showing log of tests in trace viewer 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. @@ -141,7 +141,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an The 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. -![network requests tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/0a3d1671-8ccd-4f7a-a844-35f5eb37f236) +network requests tab in trace viewer 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. @@ -151,7 +151,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an Next 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. -![meta data in trace viewer](https://github.com/microsoft/playwright/assets/13063165/82ab3d33-1ec9-4b8a-9cf2-30a6e2d59091) +meta data in trace viewer [APIRequest]: /api/class-apirequest.mdx "APIRequest" diff --git a/nodejs/docs/browsers.mdx b/nodejs/docs/browsers.mdx index 07aedaf32a7..6f5716ebace 100644 --- a/nodejs/docs/browsers.mdx +++ b/nodejs/docs/browsers.mdx @@ -153,7 +153,7 @@ With the VS Code extension you can run your tests on different browsers by check To run tests on multiple projects(browsers), select each project by checking the checkboxes next to the project name. -![Selecting projects to run tests on](https://github.com/microsoft/playwright/assets/13063165/6dc86ef4-6097-481c-9cab-b6e053ec7ea6) +Selecting projects to run tests on ### Chromium diff --git a/nodejs/docs/ci-intro.mdx b/nodejs/docs/ci-intro.mdx index 672c480def2..1af43e65283 100644 --- a/nodejs/docs/ci-intro.mdx +++ b/nodejs/docs/ci-intro.mdx @@ -73,14 +73,14 @@ Once you have your [GitHub Actions workflow](#setting-up-github-actions) setup, Click on the **Actions** tab to see the workflows. Here you see if your tests have passed or failed. ###### -![opening the workflow](https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png) +opening the workflow ## Viewing Test Logs Clicking on the workflow run shows you all the actions that GitHub performed and clicking on **Run Playwright tests** shows the error messages, what was expected and what was received as well as the call log. ###### -![Viewing Test Logs](https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png) +Viewing Test Logs ## HTML Report @@ -100,7 +100,7 @@ Locally opening the report does not work as expected as you need a web server fo npx playwright show-report name-of-my-extracted-playwright-report ``` -![viewing the HTML report](https://github.com/microsoft/playwright/assets/13063165/c5f60e56-fb75-4a2d-a4b6-054b8c5d69c1) +viewing the HTML report To learn more about reports, check out our detailed guide on [HTML Reporter](/test-reporters.mdx#html-reporter) @@ -108,7 +108,7 @@ To learn more about reports, check out our detailed guide on [HTML Reporter](/te Once 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. -![playwright trace viewer](https://github.com/microsoft/playwright/assets/13063165/10fe3585-8401-4051-b1c2-b2e92ac4c274) +playwright trace viewer ## Publishing report on the web diff --git a/nodejs/docs/codegen.mdx b/nodejs/docs/codegen.mdx index 32f5600b826..8d1e5d1f0aa 100644 --- a/nodejs/docs/codegen.mdx +++ b/nodejs/docs/codegen.mdx @@ -26,24 +26,24 @@ To record a test click on the **Record new** button from the Testing sidebar. Th In the browser go to the URL you wish to test and start clicking around to record your user actions. -![generating user actions](https://github.com/microsoft/playwright/assets/13063165/1d4c8f37-8325-4816-a665-d0e95e63f509) +generating user actions 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 -![generating assertions](https://github.com/microsoft/playwright/assets/13063165/d131eb35-b2ca-4bf4-a8ac-88b6e40dcf07) +generating assertions 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. -![code from a generated test](https://github.com/microsoft/playwright/assets/13063165/2ba4c212-4713-460a-b054-6dc6b67a9a7c) +code from a generated test ### Record at Cursor To 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. -![record at cursor in vs code](https://github.com/microsoft/playwright/assets/13063165/77948ab8-92a2-435f-9833-0944da5ae664) +record at cursor in vs code In the browser window start performing the actions you want to record. @@ -51,7 +51,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. -![code from a generated test](https://github.com/microsoft/playwright/assets/13063165/4f4bb34e-9cda-41fe-bf65-8d8016d84c7f) +code from a generated test ### Generating locators @@ -86,7 +86,7 @@ With the test generator you can record: * `'assert value'` to assert that an element has a specific value ###### -![Recording a test](https://github.com/microsoft/playwright/assets/13063165/34a79ea1-639e-4cb3-8115-bfdc78e3d34d) +Recording a test ###### When you have finished interacting with the page, press the **record** button to stop the recording and use the **copy** button to copy the generated code to your editor. @@ -102,7 +102,7 @@ You can generate [locators](/locators.mdx) with the test generator. * You can then edit the locator in this field to fine tune it or use the copy button to copy it and paste it into your code. ###### -![picking a locator](https://github.com/microsoft/playwright/assets/13063165/2c8a12e2-4e98-4fdd-af92-1d73ae696d86) +picking a locator ## Emulation diff --git a/nodejs/docs/mock.mdx b/nodejs/docs/mock.mdx index 1c5badec2d0..439a7416aee 100644 --- a/nodejs/docs/mock.mdx +++ b/nodejs/docs/mock.mdx @@ -29,7 +29,9 @@ test("mocks a fruit and doesn't call api", async ({ page }) => { }); ``` -You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. ![api mocking trace](https://github.com/microsoft/playwright/assets/13063165/3dc14cbf-c100-4efc-ac21-d7b52d698b53) +You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. + +api mocking trace Read more about [advanced networking](./network.mdx). @@ -59,9 +61,13 @@ test('gets the json from api and adds a new fruit', async ({ page }) => { }); ``` -In the trace of our test we can see that the API was called and the response was modified. ![trace of test showing api being called and fulfilled](https://github.com/microsoft/playwright/assets/13063165/8b8dd82d-1b3e-428e-871b-840581fed439) +In the trace of our test we can see that the API was called and the response was modified. + +trace of test showing api being called and fulfilled + +By inspecting the response we can see that our new fruit was added to the list. -By inspecting the response we can see that our new fruit was added to the list. ![trace of test showing the mock response](https://github.com/microsoft/playwright/assets/13063165/03e6c87c-4ecc-47e8-9ca0-30fface25e9d) +trace of test showing the mock response Read more about [advanced networking](./network.mdx). @@ -117,9 +123,13 @@ test('gets the json from HAR and checks the new fruit has been added', async ({ }); ``` -In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. ![trace showing the HAR file being used](https://github.com/microsoft/playwright/assets/13063165/1bd7ab66-ea4f-43c2-a4e5-ca17d4837ff1) +In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. + +trace showing the HAR file being used + +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. -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. ![trace showing response from HAR file](https://github.com/microsoft/playwright/assets/13063165/db3117fc-7b02-4973-9a51-29e213261a6a) +trace showing response from HAR file 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/nodejs/docs/release-notes.mdx b/nodejs/docs/release-notes.mdx index a9b24201500..c381d5bbcd4 100644 --- a/nodejs/docs/release-notes.mdx +++ b/nodejs/docs/release-notes.mdx @@ -56,7 +56,7 @@ It shows you all your executed tests sorted by slowness, and can help you unders ### Chrome for Testing -Starting with this release, Playwright switches from Chromium, to using [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57. +Playwright now runs on [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) builds rather than Chromium. Headed mode uses `chrome`; headless mode uses `chrome-headless-shell`. Existing tests should continue to pass after upgrading to v1.57. We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar. @@ -230,7 +230,9 @@ This version was also tested against the following stable channels: ## Version 1.53 ### Trace Viewer and HTML Reporter Updates -- New Steps in Trace Viewer and HTML reporter: ![New Trace Viewer Steps](https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2) +- New Steps in Trace Viewer and HTML reporter: + + New Trace Viewer Steps - New option in `'html'` reporter to set the title of a specific test run: ```js @@ -332,7 +334,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. -![Copy prompt](https://github.com/user-attachments/assets/f3654407-dd6d-4240-9845-0d96df2bf30a) +Copy prompt ### Filter visible elements @@ -361,7 +363,7 @@ export default defineConfig({ HTML report will show this information when available: -![Git information in the report](https://github.com/user-attachments/assets/f5b3f6f4-aa08-4a24-816c-7edf33ef0c37) +Git information in the report ### Test Step improvements @@ -589,7 +591,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 -![Network tab now has filters](https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2) +Network tab now has filters ### `--tsconfig` CLI option @@ -962,7 +964,7 @@ This version was also tested against the following stable channels: ### UI Mode Updates -![Playwright UI Mode](https://github.com/microsoft/playwright/assets/9881434/61ca7cfc-eb7a-4305-8b62-b6c9f098f300) +Playwright UI Mode * See tags in the test list. * Filter by tags by typing `@fast` or clicking on the tag itself. * New shortcuts: @@ -1085,7 +1087,7 @@ This version was also tested against the following stable channels: ### Test Generator Update -![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190) +Playwright Test Generator New tools to generate assertions: - "Assert visibility" tool generates [expect(locator).toBeVisible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible). @@ -1232,7 +1234,7 @@ This version was also tested against the following stable channels: ### UI Mode Updates -![Playwright UI Mode](https://github.com/microsoft/playwright/assets/746130/8ba27be0-58fd-4f62-8561-950480610369) +Playwright UI Mode 1. Zoom into time range. 1. Network panel redesign. @@ -1367,10 +1369,10 @@ This version was also tested against the following stable channels: ### Highlights * UI mode is now available in VSCode Playwright extension via a new "Show trace viewer" button: - ![Playwright UI Mode](https://github.com/microsoft/playwright/assets/746130/13094128-259b-477a-8bbb-c1181178e8a2) + Playwright UI Mode * UI mode and trace viewer mark network requests handled with [page.route()](/api/class-page.mdx#page-route) and [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) handlers, as well as those issued via the [API testing](./api-testing): - ![Trace Viewer](https://github.com/microsoft/playwright/assets/746130/0df2d4b6-faa3-465c-aff3-c435b430bfe1) + Trace Viewer * New option `maskColor` for methods [page.screenshot()](/api/class-page.mdx#page-screenshot), [locator.screenshot()](/api/class-locator.mdx#locator-screenshot), [expect(page).toHaveScreenshot()](/api/class-pageassertions.mdx#page-assertions-to-have-screenshot-1) and [expect(locator).toHaveScreenshot()](/api/class-locatorassertions.mdx#locator-assertions-to-have-screenshot-1) to change default masking color: ```js @@ -1418,7 +1420,9 @@ This version was also tested against the following stable channels: ### Highlights -* UI Mode now shows steps, fixtures and attachments: ![UI Mode attachments](https://github.com/microsoft/playwright/assets/746130/1d280419-d79a-4a56-b2dc-54d631281d56) +* UI Mode now shows steps, fixtures and attachments: + + UI Mode attachments * New property [testProject.teardown](/api/class-testproject.mdx#test-project-teardown) to specify a project that needs to run after this and all dependent projects have finished. Teardown is useful to cleanup any resources acquired by this project. A common pattern would be a `setup` dependency with a corresponding `teardown`: @@ -1566,7 +1570,7 @@ This version was also tested against the following stable channels: New [UI Mode](./test-ui-mode.mdx) lets you explore, run and debug tests. Comes with a built-in watch mode. -![Playwright UI Mode](https://user-images.githubusercontent.com/746130/227004851-3901a691-4f8e-43d6-8d6b-cbfeafaeb999.png) +Playwright UI Mode Engage with a new flag `--ui`: @@ -1790,14 +1794,14 @@ This version was also tested against the following stable channels: ### Playwright Tools * **Record at Cursor in VSCode.** You can run the test, position the cursor at the end of the test and continue generating the test. -![New VSCode Extension](https://user-images.githubusercontent.com/746130/202005839-aba2eeba-217b-424d-8496-8b4f5fa72f41.png) +New VSCode Extension * **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. -![Locator Explorer](https://user-images.githubusercontent.com/746130/201796876-01567a0b-ca61-4a9d-b12b-04786c471671.png) +Locator Explorer * **Codegen and Trace Viewer Dark Theme.** Automatically picked up from operating system settings. -![Dark Theme](https://user-images.githubusercontent.com/746130/201797969-603f74df-d7cf-4c56-befd-798dbd269796.png) +Dark Theme ### Test Runner * Configure retries and test timeout for a file or a test with [test.describe.configure()](/api/class-test.mdx#test-describe-configure). @@ -1946,7 +1950,7 @@ This version was also tested against the following stable channels: * Pick selector. * Record new test from current page state. -![vscode extension screenshot](https://user-images.githubusercontent.com/746130/183781999-1b9fdbc5-cfae-47d6-b4f7-5d4ae89716a8.jpg) +vscode extension screenshot ### Test Runner * [test.step()](/api/class-test.mdx#test-step) now returns the value of the step function: @@ -2554,7 +2558,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. -![Graphics](https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png) +Graphics Frame locators can be created with either [page.frameLocator()](/api/class-page.mdx#page-frame-locator) or [locator.frameLocator()](/api/class-locator.mdx#locator-frame-locator) method. @@ -2575,13 +2579,13 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright. - New trace metadata tab with browser details - Snapshots now have URL bar -![image](https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png) +image ### 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. -![image](https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png) +image ### Ubuntu ARM64 support + more - Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi. @@ -2678,7 +2682,7 @@ $ npx playwright test --reporter=html The HTML reporter has all the information about tests and their failures, including surfacing trace and image artifacts. -![html reporter](https://user-images.githubusercontent.com/746130/138324311-94e68b39-b51a-4776-a446-f60037a77f32.png) +html reporter Read more about [our reporters](./test-reporters#html-reporter). @@ -3034,7 +3038,7 @@ npx playwright show-trace trace.zip That will open the following GUI: -![image](https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png) +image 👉 Read more in [trace viewer documentation](./trace-viewer.mdx). diff --git a/nodejs/docs/test-ui-mode.mdx b/nodejs/docs/test-ui-mode.mdx index b910d4f0a53..c7854e2860b 100644 --- a/nodejs/docs/test-ui-mode.mdx +++ b/nodejs/docs/test-ui-mode.mdx @@ -26,89 +26,91 @@ npx playwright test --ui Once 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. -![running tests in ui mode](https://github.com/microsoft/playwright/assets/13063165/6b87712f-64a5-4d73-a91d-6562b864712c) +running tests in ui mode ## Filtering tests Filter 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. -![filtering tests in ui mode](https://github.com/microsoft/playwright/assets/13063165/6f05e589-036d-45d5-9078-38134e1261e4) +filtering tests in ui mode ## Timeline view At 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. -![timeline view in ui mode](https://github.com/microsoft/playwright/assets/13063165/811a9985-32aa-4a3e-9869-de32053cf468) +timeline view in ui mode ## Actions -In 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. ![use before and after actions in ui mode](https://github.com/microsoft/playwright/assets/13063165/7b22fab5-7346-4b98-8fdd-a78ed280647f) +In 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. + +use before and after actions in ui mode ## Pop out and inspect the DOM Pop 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. -![pop out dom snapshot in ui mode](https://github.com/microsoft/playwright/assets/13063165/f9f43a0c-78d7-4574-9a58-c69d2ec53c8f) +pop out dom snapshot in ui mode ## Pick locator Click 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. -![pick locator in ui mode](https://github.com/microsoft/playwright/assets/13063165/9e7eeb84-bd26-4010-8614-75e24b56c716) +pick locator in ui mode ## Source As 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. -![showing source code of tests in ui mode](https://github.com/microsoft/playwright/assets/13063165/49b9fa2a-8a57-4044-acaa-0a2ea4784c5c) +showing source code of tests in ui mode ## Call The 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. -![showing call tab in ui mode](https://github.com/microsoft/playwright/assets/13063165/442314c3-0b16-4400-bf25-c198f8654849) +showing call tab in ui mode ## Log See 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. -![showing log of tests in ui mode](https://github.com/microsoft/playwright/assets/13063165/1d214ee5-2c07-414d-a342-f88d0864ac89) +showing log of tests in ui mode ## Errors If 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. -![showing errors in ui mode](https://github.com/microsoft/playwright/assets/13063165/ffca2fd1-5349-41fb-ade9-ace143bb2c58) +showing errors in ui mode ## Console See 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. -![showing console logs from tests in ui mode](https://github.com/microsoft/playwright/assets/13063165/b6a44763-da04-4152-bbac-3369ca4a60ac) +showing console logs from tests in ui mode ## Network The 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. -![showing network requests from tests in ui mode](https://github.com/microsoft/playwright/assets/13063165/946c2722-447a-4005-9518-b4e9b73a8240) +showing network requests from tests in ui mode ## Attachments The "Attachments" tab allows you to explore attachments. If you're doing [visual regression testing](./test-snapshots.mdx), 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. -![ui mode with attachments](https://github.com/microsoft/playwright/assets/13063165/bb83b406-84ed-4380-a96c-0e62d1388093) +ui mode with attachments ## Metadata Next 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. -![metadata tab in ui mode](https://github.com/microsoft/playwright/assets/13063165/befff46e-381a-41c2-8259-e47442add425) +metadata tab in ui mode ## Watch mode Next 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. -![watch mode in ui mode](https://github.com/microsoft/playwright/assets/13063165/20d7d44c-b52d-43ff-8871-8b828671f3da) +watch mode in ui mode ## Docker & GitHub Codespaces diff --git a/nodejs/docs/trace-viewer.mdx b/nodejs/docs/trace-viewer.mdx index 7f048ac17c1..b7c9329436b 100644 --- a/nodejs/docs/trace-viewer.mdx +++ b/nodejs/docs/trace-viewer.mdx @@ -124,7 +124,7 @@ If you are not using Playwright as a Test Runner, use the [browserContext.tracin In 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. -![actions tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/948b65cd-f0fd-4c7f-8e53-2c632b5a07f1) +actions tab in trace viewer **Selecting each action reveals:** - Action snapshots @@ -137,7 +137,7 @@ When tracing with the [screenshots](/api/class-tracing.mdx#tracing-start-option- 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. -![timeline view in trace viewer](https://github.com/microsoft/playwright/assets/13063165/b04a7d75-54bb-4ab2-9e30-e76f6f74a2c8) +timeline view in trace viewer ### Snapshots @@ -151,7 +151,7 @@ When tracing with the [snapshots](/api/class-tracing.mdx#tracing-start-option-sn Here is what the typical Action snapshot looks like: -![action tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/7168d549-eb0a-4964-9c93-483f03711fa9) +action tab in trace viewer Notice how it highlights both, the DOM Node as well as the exact click position. @@ -159,31 +159,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. -![showing source code tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/daa8845d-c250-4923-aa7a-5d040da9adc5) +showing source code tab in trace viewer ### Call The 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. -![showing call tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/95498580-f9dd-4932-a123-c37fe7cfc3c2) +showing call tab in trace viewer ### Log See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/de621461-3bab-4140-b39d-9f02d6672dbf) +showing log of tests in trace viewer ### Errors If 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. -![showing errors in trace viewer](https://github.com/microsoft/playwright/assets/13063165/e9ef77b3-05d1-4df2-852c-981023723d34) +showing errors in trace viewer ### Console See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/4107c08d-1eaf-421c-bdd4-9dd2aa641d4a) +showing log of tests in trace viewer 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. @@ -193,7 +193,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an The 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. -![network requests tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/0a3d1671-8ccd-4f7a-a844-35f5eb37f236) +network requests tab in trace viewer 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. @@ -203,13 +203,13 @@ Use the timeline to filter actions, by clicking a start point and dragging to an Next 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. -![meta data in trace viewer](https://github.com/microsoft/playwright/assets/13063165/82ab3d33-1ec9-4b8a-9cf2-30a6e2d59091) +meta data in trace viewer ### Attachments The "Attachments" tab allows you to explore attachments. If you're doing [visual regression testing](./test-snapshots.mdx), 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. -![attachments tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/4386178a-5808-4fa8-9436-315350a23b04) +attachments tab in trace viewer [Android]: /api/class-android.mdx "Android" diff --git a/python/docs/ci-intro.mdx b/python/docs/ci-intro.mdx index ecf462770e4..286e25dbfb9 100644 --- a/python/docs/ci-intro.mdx +++ b/python/docs/ci-intro.mdx @@ -72,14 +72,14 @@ Once you have your [GitHub Actions workflow](#setting-up-github-actions) setup, Click on the **Actions** tab to see the workflows. Here you see if your tests have passed or failed. ###### -![opening the workflow](https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png) +opening the workflow ## Viewing Test Logs Clicking on the workflow run shows you all the actions that GitHub performed and clicking on **Run Playwright tests** shows the error messages, what was expected and what was received as well as the call log. ###### -![Viewing Test Logs](https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png) +Viewing Test Logs ## Viewing the Trace diff --git a/python/docs/codegen.mdx b/python/docs/codegen.mdx index 95bd845479a..53df9627ddd 100644 --- a/python/docs/codegen.mdx +++ b/python/docs/codegen.mdx @@ -36,7 +36,7 @@ With the test generator you can record: * `'assert value'` to assert that an element has a specific value ###### -![recording a test](https://github.com/microsoft/playwright/assets/13063165/9751b609-6e4c-486b-a961-f86f177b1d58) +recording a test ###### When you have finished interacting with the page, press the **record** button to stop the recording and use the **copy** button to copy the generated code to your editor. @@ -52,7 +52,7 @@ You can generate [locators](/locators.mdx) with the test generator. * You can then edit the locator in this field to fine tune it or use the copy button to copy it and paste it into your code. ###### -![picking a locator](https://github.com/microsoft/playwright/assets/13063165/95d11f48-96a4-46b9-9c2a-63c3aa4fdce7) +picking a locator ## Emulation diff --git a/python/docs/library.mdx b/python/docs/library.mdx index 5e96add12c0..298568712c1 100644 --- a/python/docs/library.mdx +++ b/python/docs/library.mdx @@ -10,7 +10,7 @@ import HTMLCard from '@site/src/components/HTMLCard'; ### Pip -[![PyPI version](https://badge.fury.io/py/playwright.svg)](https://pypi.python.org/pypi/playwright/) +[PyPI version](https://pypi.python.org/pypi/playwright/) ```bash pip install --upgrade pip @@ -20,7 +20,7 @@ playwright install ### Conda -[![Anaconda version](https://img.shields.io/conda/v/microsoft/playwright)](https://anaconda.org/Microsoft/playwright) +[Anaconda version](https://anaconda.org/Microsoft/playwright) ```bash conda config --add channels conda-forge diff --git a/python/docs/mock.mdx b/python/docs/mock.mdx index 241b912e82b..0a8c723626d 100644 --- a/python/docs/mock.mdx +++ b/python/docs/mock.mdx @@ -64,7 +64,9 @@ async def test_mock_the_fruit_api(page: Page): -You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. ![api mocking trace](https://github.com/microsoft/playwright/assets/13063165/3dc14cbf-c100-4efc-ac21-d7b52d698b53) +You can see from the trace of the example test that the API was never called, it was however fulfilled with the mock data. + +api mocking trace Read more about [advanced networking](./network.mdx). @@ -128,9 +130,13 @@ async def test_gets_the_json_from_api_and_adds_a_new_fruit(page: Page): -In the trace of our test we can see that the API was called and the response was modified. ![trace of test showing api being called and fulfilled](https://github.com/microsoft/playwright/assets/13063165/8b8dd82d-1b3e-428e-871b-840581fed439) +In the trace of our test we can see that the API was called and the response was modified. + +trace of test showing api being called and fulfilled + +By inspecting the response we can see that our new fruit was added to the list. -By inspecting the response we can see that our new fruit was added to the list. ![trace of test showing the mock response](https://github.com/microsoft/playwright/assets/13063165/03e6c87c-4ecc-47e8-9ca0-30fface25e9d) +trace of test showing the mock response Read more about [advanced networking](./network.mdx). @@ -252,9 +258,13 @@ async def test_gets_the_json_from_har_and_checks_the_new_fruit_has_been_added(pa -In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. ![trace showing the HAR file being used](https://github.com/microsoft/playwright/assets/13063165/1bd7ab66-ea4f-43c2-a4e5-ca17d4837ff1) +In the trace of our test we can see that the route was fulfilled from the HAR file and the API was not called. + +trace showing the HAR file being used + +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. -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. ![trace showing response from HAR file](https://github.com/microsoft/playwright/assets/13063165/db3117fc-7b02-4973-9a51-29e213261a6a) +trace showing response from HAR file 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/python/docs/release-notes.mdx b/python/docs/release-notes.mdx index d6db2d1dd68..d237962adb6 100644 --- a/python/docs/release-notes.mdx +++ b/python/docs/release-notes.mdx @@ -42,7 +42,7 @@ This version was also tested against the following stable channels: ### Chrome for Testing -Starting with this release, Playwright switches from Chromium, to using [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57. +Playwright now runs on [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) builds rather than Chromium. Headed mode uses `chrome`; headless mode uses `chrome-headless-shell`. Existing tests should continue to pass after upgrading to v1.57. We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar. @@ -129,7 +129,9 @@ This version was also tested against the following stable channels: ## Version 1.53 ### Trace Viewer and HTML Reporter Updates -- New Steps in Trace Viewer: ![New Trace Viewer Steps](https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2) +- New Steps in Trace Viewer: + + New Trace Viewer Steps - New method [locator.describe()](/api/class-locator.mdx#locator-describe) to describe a locator. Used for trace viewer. ```python @@ -364,7 +366,7 @@ The Network tab in the trace viewer has several nice improvements: - better display of query string parameters - preview of font assets -![Network tab now has filters](https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2) +Network tab now has filters ### Miscellaneous - The `mcr.microsoft.com/playwright/python:v1.47.0` now serves a Playwright image based on Ubuntu 24.04 Noble. To use the 22.04 jammy-based image, please use `mcr.microsoft.com/playwright/python:v1.47.0-jammy` instead. @@ -626,7 +628,7 @@ This version was also tested against the following stable channels: ### Test Generator Update -![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190) +Playwright Test Generator New tools to generate assertions: - "Assert visibility" tool generates [expect(locator).to_be_visible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible). @@ -681,7 +683,7 @@ This version was also tested against the following stable channels: ### Trace Viewer Updates -![Playwright Trace Viewer](https://github.com/microsoft/playwright/assets/746130/0c41e20d-c54b-4600-8ca8-1cbb6393ddef) +Playwright Trace Viewer 1. Zoom into time range. 1. Network panel redesign. @@ -950,7 +952,7 @@ This version was also tested against the following stable channels: ### Playwright Tools * **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool. -![Locator Explorer](https://user-images.githubusercontent.com/9798949/202293514-8e2eade6-c809-4b0a-864b-899dfcee3d84.png) +Locator Explorer ### New APIs - [locator.blur()](/api/class-locator.mdx#locator-blur) @@ -1318,7 +1320,7 @@ Note that the new methods [page.route_from_har()](/api/class-page.mdx#page-route - Codegen now supports generating Pytest Tests - ![Graphics](https://user-images.githubusercontent.com/746130/168098384-40784024-6c26-4426-8255-e714862af6fc.png) + Graphics ## Version 1.21 @@ -1565,7 +1567,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. -![Graphics](https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png) +Graphics Frame locators can be created with either [page.frame_locator()](/api/class-page.mdx#page-frame-locator) or [locator.frame_locator()](/api/class-locator.mdx#locator-frame-locator) method. @@ -1586,13 +1588,13 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright. - New trace metadata tab with browser details - Snapshots now have URL bar -![image](https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png) +image ### 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. -![image](https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png) +image ### Ubuntu ARM64 support + more - Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi. @@ -1795,7 +1797,7 @@ playwright show-trace trace.zip That will open the following GUI: -![image](https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png) +image 👉 Read more in [trace viewer documentation](./trace-viewer.mdx). diff --git a/python/docs/running-tests.mdx b/python/docs/running-tests.mdx index 10fd48b4052..99b092d94c8 100644 --- a/python/docs/running-tests.mdx +++ b/python/docs/running-tests.mdx @@ -194,7 +194,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. -![Playwright Inspector](https://github.com/microsoft/playwright/assets/13063165/c94c89c8-f945-460c-a653-7809c6ca50ee) +Playwright Inspector Check out our [debugging guide](./debug.mdx) to learn more about the [Playwright Inspector](./debug.mdx#playwright-inspector) as well as debugging with [Browser Developer tools](./debug.mdx#browser-developer-tools). diff --git a/python/docs/trace-viewer-intro.mdx b/python/docs/trace-viewer-intro.mdx index 00ddbbf5e24..6781c3cf0a4 100644 --- a/python/docs/trace-viewer-intro.mdx +++ b/python/docs/trace-viewer-intro.mdx @@ -88,7 +88,7 @@ playwright show-trace trace.zip ``` ###### -![playwright trace viewer](https://github.com/microsoft/playwright/assets/13063165/10fe3585-8401-4051-b1c2-b2e92ac4c274) +playwright trace viewer To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx). diff --git a/python/docs/trace-viewer.mdx b/python/docs/trace-viewer.mdx index 2c49b94d2f6..0631441c6ff 100644 --- a/python/docs/trace-viewer.mdx +++ b/python/docs/trace-viewer.mdx @@ -113,7 +113,7 @@ await context.tracing.stop(path = "trace.zip") In 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. -![actions tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/948b65cd-f0fd-4c7f-8e53-2c632b5a07f1) +actions tab in trace viewer **Selecting each action reveals:** - Action snapshots @@ -126,7 +126,7 @@ When tracing with the [screenshots](/api/class-tracing.mdx#tracing-start-option- 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. -![timeline view in trace viewer](https://github.com/microsoft/playwright/assets/13063165/b04a7d75-54bb-4ab2-9e30-e76f6f74a2c8) +timeline view in trace viewer ### Snapshots @@ -140,7 +140,7 @@ When tracing with the [snapshots](/api/class-tracing.mdx#tracing-start-option-sn Here is what the typical Action snapshot looks like: -![action tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/7168d549-eb0a-4964-9c93-483f03711fa9) +action tab in trace viewer Notice how it highlights both, the DOM Node as well as the exact click position. @@ -148,31 +148,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. -![showing source code tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/daa8845d-c250-4923-aa7a-5d040da9adc5) +showing source code tab in trace viewer ### Call The 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. -![showing call tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/95498580-f9dd-4932-a123-c37fe7cfc3c2) +showing call tab in trace viewer ### Log See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/de621461-3bab-4140-b39d-9f02d6672dbf) +showing log of tests in trace viewer ### Errors If 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. -![showing errors in trace viewer](https://github.com/microsoft/playwright/assets/13063165/e9ef77b3-05d1-4df2-852c-981023723d34) +showing errors in trace viewer ### Console See 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. -![showing log of tests in trace viewer](https://github.com/microsoft/playwright/assets/13063165/4107c08d-1eaf-421c-bdd4-9dd2aa641d4a) +showing log of tests in trace viewer 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. @@ -182,7 +182,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an The 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. -![network requests tab in trace viewer](https://github.com/microsoft/playwright/assets/13063165/0a3d1671-8ccd-4f7a-a844-35f5eb37f236) +network requests tab in trace viewer 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. @@ -192,7 +192,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an Next 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. -![meta data in trace viewer](https://github.com/microsoft/playwright/assets/13063165/82ab3d33-1ec9-4b8a-9cf2-30a6e2d59091) +meta data in trace viewer [APIRequest]: /api/class-apirequest.mdx "APIRequest" diff --git a/src/components/GitHubStarButton/index.tsx b/src/components/GitHubStarButton/index.tsx index cd9e2810a31..9462b836454 100644 --- a/src/components/GitHubStarButton/index.tsx +++ b/src/components/GitHubStarButton/index.tsx @@ -6,7 +6,7 @@ type StarButtonProps = { repo: string } -const STARS = '82k+'; // NOTE: this line is generated by src/generate.js. Do not change! +const STARS = '83k+'; // NOTE: this line is generated by src/generate.js. Do not change! const StarButton: React.FC = ({owner, repo}) => { if (!repo)