From 444897ea9e869e81b05992f0f75b3b4b2eaf679c Mon Sep 17 00:00:00 2001
From: "microsoft-playwright-automation[bot]"
<203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
Date: Thu, 16 Oct 2025 10:10:33 +0000
Subject: [PATCH] feat(roll): roll to ToT Playwright (16-10-25)
---
dotnet/docs/api/class-locator.mdx | 21 +++
dotnet/docs/network.mdx | 7 +-
java/docs/api/class-locator.mdx | 21 +++
java/docs/network.mdx | 7 +-
nodejs/docs/api/class-locator.mdx | 21 +++
nodejs/docs/network.mdx | 10 +-
...network-events.mdx => service-workers.mdx} | 163 ++++--------------
python/docs/api/class-locator.mdx | 45 +++++
python/docs/network.mdx | 7 +-
9 files changed, 158 insertions(+), 144 deletions(-)
rename nodejs/docs/{service-workers-experimental-network-events.mdx => service-workers.mdx} (56%)
diff --git a/dotnet/docs/api/class-locator.mdx b/dotnet/docs/api/class-locator.mdx
index 62f77c78daa..041ff4da708 100644
--- a/dotnet/docs/api/class-locator.mdx
+++ b/dotnet/docs/api/class-locator.mdx
@@ -545,6 +545,27 @@ await button.ClickAsync();
---
+### Description {#locator-description}
+
+Added in: v1.57locator.Description
+
+Returns locator description previously set with [Locator.Describe()](/api/class-locator.mdx#locator-describe).
+
+**Usage**
+
+```csharp
+var button = Page.GetByRole(AriaRole.Button).Describe("Subscribe button");
+Console.WriteLine(button.Description()); // "Subscribe button"
+
+var input = Page.GetByRole(AriaRole.Textbox);
+Console.WriteLine(input.Description()); // null
+```
+
+**Returns**
+- [string]?#
+
+---
+
### DispatchEventAsync {#locator-dispatch-event}
Added in: v1.14locator.DispatchEventAsync
diff --git a/dotnet/docs/network.mdx b/dotnet/docs/network.mdx
index 512847ea620..a6549b1f385 100644
--- a/dotnet/docs/network.mdx
+++ b/dotnet/docs/network.mdx
@@ -220,9 +220,10 @@ page.WebSocket += (_, ws) =>
## Missing Network Events and Service Workers
Playwright's built-in [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route) allow your tests to natively route requests and perform mocking and interception.
-1. If you're using Playwright's native [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [ServiceWorkers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
-1. It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
-1. If you're interested in not solely using Service Workers for testing and network mocking, but in routing and listening for requests made by Service Workers themselves, please see [this experimental feature](https://github.com/microsoft/playwright/issues/15684).
+
+If you're using Playwright's native [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [ServiceWorkers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
+
+It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route) and [Page.RouteAsync()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
[Accessibility]: /api/class-accessibility.mdx "Accessibility"
diff --git a/java/docs/api/class-locator.mdx b/java/docs/api/class-locator.mdx
index 2aca2d1d148..0176ed3563c 100644
--- a/java/docs/api/class-locator.mdx
+++ b/java/docs/api/class-locator.mdx
@@ -546,6 +546,27 @@ button.click();
---
+### description {#locator-description}
+
+Added in: v1.57locator.description
+
+Returns locator description previously set with [Locator.describe()](/api/class-locator.mdx#locator-describe).
+
+**Usage**
+
+```java
+Locator button = page.getByRole(AriaRole.BUTTON).describe("Subscribe button");
+System.out.println(button.description()); // "Subscribe button"
+
+Locator input = page.getByRole(AriaRole.TEXTBOX);
+System.out.println(input.description()); // null
+```
+
+**Returns**
+- [null] | [String]#
+
+---
+
### dispatchEvent {#locator-dispatch-event}
Added in: v1.14locator.dispatchEvent
diff --git a/java/docs/network.mdx b/java/docs/network.mdx
index 97c34f97b68..c98c58d4c30 100644
--- a/java/docs/network.mdx
+++ b/java/docs/network.mdx
@@ -214,9 +214,10 @@ page.onWebSocket(ws -> {
## Missing Network Events and Service Workers
Playwright's built-in [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route) allow your tests to natively route requests and perform mocking and interception.
-1. If you're using Playwright's native [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [setServiceWorkers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
-1. It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
-1. If you're interested in not solely using Service Workers for testing and network mocking, but in routing and listening for requests made by Service Workers themselves, please see [this experimental feature](https://github.com/microsoft/playwright/issues/15684).
+
+If you're using Playwright's native [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [setServiceWorkers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
+
+It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [BrowserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [Page.route()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
[APIRequest]: /api/class-apirequest.mdx "APIRequest"
diff --git a/nodejs/docs/api/class-locator.mdx b/nodejs/docs/api/class-locator.mdx
index 19208a39d5b..36cf5de2f3e 100644
--- a/nodejs/docs/api/class-locator.mdx
+++ b/nodejs/docs/api/class-locator.mdx
@@ -547,6 +547,27 @@ await button.click();
---
+### description {#locator-description}
+
+Added in: v1.57locator.description
+
+Returns locator description previously set with [locator.describe()](/api/class-locator.mdx#locator-describe).
+
+**Usage**
+
+```js
+const button = page.getByRole('button').describe('Subscribe button');
+console.log(button.description()); // "Subscribe button"
+
+const input = page.getByRole('textbox');
+console.log(input.description()); // null
+```
+
+**Returns**
+- [null] | [string]#
+
+---
+
### dispatchEvent {#locator-dispatch-event}
Added in: v1.14locator.dispatchEvent
diff --git a/nodejs/docs/network.mdx b/nodejs/docs/network.mdx
index 2e380557bc2..0741c5961bc 100644
--- a/nodejs/docs/network.mdx
+++ b/nodejs/docs/network.mdx
@@ -333,9 +333,13 @@ page.on('websocket', ws => {
## Missing Network Events and Service Workers
Playwright's built-in [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route) allow your tests to natively route requests and perform mocking and interception.
-1. If you're using Playwright's native [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [serviceWorkers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
-1. It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
-1. If you're interested in not solely using Service Workers for testing and network mocking, but in routing and listening for requests made by Service Workers themselves, please see [this experimental feature](https://github.com/microsoft/playwright/issues/15684).
+
+If you're using Playwright's native [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [serviceWorkers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
+
+It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
+
+######
+If you're interested in not solely using Service Workers for testing and network mocking, but in routing and listening for requests made by Service Workers themselves, please see [this guide](./service-workers.mdx).
[Accessibility]: /api/class-accessibility.mdx "Accessibility"
diff --git a/nodejs/docs/service-workers-experimental-network-events.mdx b/nodejs/docs/service-workers.mdx
similarity index 56%
rename from nodejs/docs/service-workers-experimental-network-events.mdx
rename to nodejs/docs/service-workers.mdx
index ab540ed68a3..ad152ab9cb1 100644
--- a/nodejs/docs/service-workers-experimental-network-events.mdx
+++ b/nodejs/docs/service-workers.mdx
@@ -1,6 +1,6 @@
---
-id: service-workers-experimental
-title: "(Experimental) Service Worker Network Events"
+id: service-workers
+title: "Service Workers"
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -10,6 +10,10 @@ import HTMLCard from '@site/src/components/HTMLCard';
:::warning
+Service workers are only supported on Chromium-based browsers.
+:::
+
+:::note
If you're looking to do general network mocking, routing, and interception, please see the [Network Guide](./network.mdx) first. Playwright provides built-in APIs for this use case that don't require the information below. However, if you're interested in requests made by Service Workers themselves, please read below.
:::
@@ -19,17 +23,23 @@ They can act as a **network proxy** between the page and the external network to
Many sites that use Service Workers simply use them as a transparent optimization technique. While users might notice a faster experience, the app's implementation is unaware of their existence. Running the app with or without Service Workers enabled appears functionally equivalent.
-## How to Enable
+## How to Disable Service Workers
-Playwright's inspection and routing of requests made by Service Workers are **experimental** and disabled by default.
+Playwright allows to disable Service Workers during testing. This makes tests more predictable and performant. However, if your actual page uses a Service Worker, the behavior might be different.
-Set the `PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS` environment variable to `1` (or any other value) to enable the feature. Only Chrome/Chromium are currently supported.
+To disable service workers, set [testOptions.serviceWorkers](/api/class-testoptions.mdx#test-options-service-workers) to `'block'`.
-If you're using (or are interested in using this feature), please comment on [this issue](https://github.com/microsoft/playwright/issues/15684) letting us know your use case.
+```js title="playwright.config.ts"
+import { defineConfig } from '@playwright/test';
-## Service Worker Fetch
+export default defineConfig({
+ use: {
+ serviceWorkers: 'allow'
+ },
+});
+```
-### Accessing Service Workers and Waiting for Activation
+## Accessing Service Workers and Waiting for Activation
You can use [browserContext.serviceWorkers()](/api/class-browsercontext.mdx#browser-context-service-workers) to list the Service [Worker]s, or specifically watch for the Service [Worker] if you anticipate a page will trigger its [registration](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register):
@@ -39,7 +49,7 @@ await page.goto('/example-with-a-service-worker.html');
const serviceworker = await serviceWorkerPromise;
```
-[browserContext.on('serviceworker')](/api/class-browsercontext.mdx#browser-context-event-service-worker) is fired ***before*** the Service Worker's main script has been evaluated, so ***before*** calling service[worker.evaluate()](/api/class-worker.mdx#worker-evaluate) you should wait on its activation.
+[browserContext.on('serviceworker')](/api/class-browsercontext.mdx#browser-context-event-service-worker) event is fired ***before*** the Service Worker has taken control over the page, so ***before*** evaluating in the worker with [worker.evaluate()](/api/class-worker.mdx#worker-evaluate) you should wait on its activation.
There are more idiomatic methods of waiting for a Service Worker to be activated, but the following is an implementation agnostic method:
@@ -48,28 +58,22 @@ await page.evaluate(async () => {
const registration = await window.navigator.serviceWorker.getRegistration();
if (registration.active?.state === 'activated')
return;
- await new Promise(res =>
- window.navigator.serviceWorker.addEventListener('controllerchange', res),
- );
+ await new Promise(resolve => {
+ window.navigator.serviceWorker.addEventListener('controllerchange', resolve);
+ });
});
```
-### Network Events and Routing
+## Network Events and Routing
-Any network request made by the **Service Worker** will have:
-* [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) and its corresponding events ([browserContext.on('requestfinished')](/api/class-browsercontext.mdx#browser-context-event-request-finished) and [browserContext.on('response')](/api/class-browsercontext.mdx#browser-context-event-response), or [browserContext.on('requestfailed')](/api/class-browsercontext.mdx#browser-context-event-request-failed))
-* [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) will see the request
+Any network request made by the **Service Worker** is reported through the [BrowserContext] object:
+* [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request), [browserContext.on('requestfinished')](/api/class-browsercontext.mdx#browser-context-event-request-finished), [browserContext.on('response')](/api/class-browsercontext.mdx#browser-context-event-response) and [browserContext.on('requestfailed')](/api/class-browsercontext.mdx#browser-context-event-request-failed) are fired
+* [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route) sees the request
* [request.serviceWorker()](/api/class-request.mdx#request-service-worker) will be set to the Service [Worker] instance, and [request.frame()](/api/class-request.mdx#request-frame) will **throw**
-* [response.fromServiceWorker()](/api/class-response.mdx#response-from-service-worker) will return `false`
-Additionally, any network request made by the **Page** (including its sub-[Frame]s) will have:
-* [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) and its corresponding events ([browserContext.on('requestfinished')](/api/class-browsercontext.mdx#browser-context-event-request-finished) and [browserContext.on('response')](/api/class-browsercontext.mdx#browser-context-event-response), or [browserContext.on('requestfailed')](/api/class-browsercontext.mdx#browser-context-event-request-failed))
-* [page.on('request')](/api/class-page.mdx#page-event-request) and its corresponding events ([page.on('requestfinished')](/api/class-page.mdx#page-event-request-finished) and [page.on('response')](/api/class-page.mdx#page-event-response), or [page.on('requestfailed')](/api/class-page.mdx#page-event-request-failed))
-* [page.route()](/api/class-page.mdx#page-route) and [page.route()](/api/class-page.mdx#page-route) will **not** see the request (if a Service Worker's fetch handler was registered)
-* [request.serviceWorker()](/api/class-request.mdx#request-service-worker) will be set to `null`, and [request.frame()](/api/class-request.mdx#request-frame) will return the [Frame]
-* [response.fromServiceWorker()](/api/class-response.mdx#response-from-service-worker) will return `true` (if a Service Worker's fetch handler was registered)
+Additionally, for any network request made by the **Page**, method [response.fromServiceWorker()](/api/class-response.mdx#response-from-service-worker) return `true` when the request was handled a Service Worker's fetch handler.
-Many Service Worker implementations simply execute the request from the page (possibly with some custom caching/offline logic omitted for simplicity):
+Consider a simple service worker that fetches every request made by the page:
```js title="transparent-service-worker.js"
self.addEventListener('fetch', event => {
@@ -84,16 +88,7 @@ self.addEventListener('activate', event => {
});
```
-If a page registers the above Service Worker:
-
-```html
-
-
-```
-
-On the first visit to the page via [page.goto()](/api/class-page.mdx#page-goto), the following Request/Response events would be emitted (along with the corresponding network lifecycle events):
+If `index.html` registers this service worker, and then fetches `data.json`, the following Request/Response events would be emitted (along with the corresponding network lifecycle events):
| Event | Owner | URL | Routed | [response.fromServiceWorker()](/api/class-response.mdx#response-from-service-worker) |
| - | - | - | - | - |
@@ -113,115 +108,19 @@ Since the example Service Worker just acts a basic transparent "proxy":
It's important to note: calling [request.frame()](/api/class-request.mdx#request-frame) or [response.frame()](/api/class-response.mdx#response-frame) will **throw** an exception, if called on a [Request]/[Response] that has a non-null [request.serviceWorker()](/api/class-request.mdx#request-service-worker).
:::
-#### Advanced Example
-
-When a Service Worker handles a page's request, the Service Worker can make 0 to n requests to the external network. The Service Worker might respond directly from a cache, generate a response in memory, rewrite the request, make two requests and then combine into 1, etc.
-
-Consider the code snippets below to understand Playwright's view into the Request/Responses and how it impacts routing in some of these cases.
-
-```js title="complex-service-worker.js"
-self.addEventListener('install', function(event) {
- event.waitUntil(
- caches.open('v1').then(function(cache) {
- // 1. Pre-fetches and caches /addressbook.json
- return cache.add('/addressbook.json');
- })
- );
-});
-
-// Opt to handle FetchEvent's from the page
-self.addEventListener('fetch', event => {
- event.respondWith(
- (async () => {
- // 1. Try to first serve directly from caches
- const response = await caches.match(event.request);
- if (response)
- return response;
-
- // 2. Re-write request for /foo to /bar
- if (event.request.url.endsWith('foo'))
- return fetch('./bar');
-
- // 3. Prevent tracker.js from being retrieved, and returns a placeholder response
- if (event.request.url.endsWith('tracker.js')) {
- return new Response('console.log("no trackers!")', {
- status: 200,
- headers: { 'Content-Type': 'text/javascript' },
- });
- }
-
- // 4. Otherwise, fallthrough, perform the fetch and respond
- return fetch(event.request);
- })()
- );
-});
-
-self.addEventListener('activate', event => {
- event.waitUntil(clients.claim());
-});
-```
-
-And a page that simply registers the Service Worker:
-
-```html
-
-
-```
-
-On the first visit to the page via [page.goto()](/api/class-page.mdx#page-goto), the following Request/Response events would be emitted:
-
-| Event | Owner | URL | Routed | [response.fromServiceWorker()](/api/class-response.mdx#response-from-service-worker) |
-| - | - | - | - | - |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | [Frame] | index.html | Yes | |
-| [page.on('request')](/api/class-page.mdx#page-event-request) | [Frame] | index.html | Yes | |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | Service [Worker] | complex-service-worker.js | Yes | |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | Service [Worker] | addressbook.json | Yes | |
-
-It's important to note that [`cache.add`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/add) caused the Service Worker to make a request (Service [Worker]-owned), even before `addressbook.json` was asked for in the page.
-
-Once the Service Worker is activated and handling FetchEvents, if the page makes the following requests:
-
-```js
-await page.evaluate(() => fetch('/addressbook.json'));
-await page.evaluate(() => fetch('/foo'));
-await page.evaluate(() => fetch('/tracker.js'));
-await page.evaluate(() => fetch('/fallthrough.txt'));
-```
-
-The following Request/Response events would be emitted:
-
-| Event | Owner | URL | Routed | [response.fromServiceWorker()](/api/class-response.mdx#response-from-service-worker) |
-| - | - | - | - | - |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | [Frame] | addressbook.json | | Yes |
-| [page.on('request')](/api/class-page.mdx#page-event-request) | [Frame] | addressbook.json | | Yes |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | Service [Worker] | bar | Yes | |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | [Frame] | foo | | Yes |
-| [page.on('request')](/api/class-page.mdx#page-event-request) | [Frame] | foo | | Yes |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | [Frame] | tracker.js | | Yes |
-| [page.on('request')](/api/class-page.mdx#page-event-request) | [Frame] | tracker.js | | Yes |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | Service [Worker] | fallthrough.txt | Yes | |
-| [browserContext.on('request')](/api/class-browsercontext.mdx#browser-context-event-request) | [Frame] | fallthrough.txt | | Yes |
-| [page.on('request')](/api/class-page.mdx#page-event-request) | [Frame] | fallthrough.txt | | Yes |
-
-It's important to note:
-* The page requested `/foo`, but the Service Worker requested `/bar`, so there are only [Frame]-owned events for `/foo`, but not `/bar`.
-* Likewise, the Service Worker never hit the network for `tracker.js`, so only [Frame]-owned events were emitted for that request.
-
## Routing Service Worker Requests Only
```js
await context.route('**', async route => {
if (route.request().serviceWorker()) {
// NB: calling route.request().frame() here would THROW
- return route.fulfill({
+ await route.fulfill({
contentType: 'text/plain',
status: 200,
body: 'from sw',
});
} else {
- return route.continue();
+ await route.continue();
}
});
```
diff --git a/python/docs/api/class-locator.mdx b/python/docs/api/class-locator.mdx
index c8b70edb155..03c19f35c7b 100644
--- a/python/docs/api/class-locator.mdx
+++ b/python/docs/api/class-locator.mdx
@@ -3311,6 +3311,51 @@ await frame_locator.get_by_role("button").click()
---
+### description {#locator-description}
+
+Added in: v1.57locator.description
+
+Returns locator description previously set with [locator.describe()](/api/class-locator.mdx#locator-describe).
+
+**Usage**
+
+
+
+
+```py
+button = page.get_by_role("button").describe("Subscribe button")
+print(button.description()) # "Subscribe button"
+
+input = page.get_by_role("textbox")
+print(input.description()) # None
+```
+
+
+
+
+```py
+button = page.get_by_role("button").describe("Subscribe button")
+print(button.description()) # "Subscribe button"
+
+input = page.get_by_role("textbox")
+print(input.description()) # None
+```
+
+
+
+
+**Returns**
+- [NoneType] | [str]#
+
+---
+
### first {#locator-first}
Added in: v1.14locator.first
diff --git a/python/docs/network.mdx b/python/docs/network.mdx
index 0171c3e2dce..047284bf406 100644
--- a/python/docs/network.mdx
+++ b/python/docs/network.mdx
@@ -498,9 +498,10 @@ page.on("websocket", on_web_socket)
## Missing Network Events and Service Workers
Playwright's built-in [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route) allow your tests to natively route requests and perform mocking and interception.
-1. If you're using Playwright's native [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [service_workers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
-1. It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
-1. If you're interested in not solely using Service Workers for testing and network mocking, but in routing and listening for requests made by Service Workers themselves, please see [this experimental feature](https://github.com/microsoft/playwright/issues/15684).
+
+If you're using Playwright's native [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route), and it appears network events are missing, disable Service Workers by setting [service_workers](/api/class-browser.mdx#browser-new-context-option-service-workers) to `'block'`.
+
+It might be that you are using a mock tool such as Mock Service Worker (MSW). While this tool works out of the box for mocking responses, it adds its own Service Worker that takes over the network requests, hence making them invisible to [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route). If you are interested in both network testing and mocking, consider using built-in [browser_context.route()](/api/class-browsercontext.mdx#browser-context-route) and [page.route()](/api/class-page.mdx#page-route) for [response mocking](#handle-requests).
[Accessibility]: /api/class-accessibility.mdx "Accessibility"