Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: deprecate: Request.serviceWorker() (#32136)
Max Schmittb7ed4d7b9e43
diff --git a/docs/src/api/class-request.md b/docs/src/api/class-request.mdindex e13d9de69f..db878f9995 100644--- a/docs/src/api/class-request.md+++ b/docs/src/api/class-request.md@@ -288,15 +288,10 @@ Returns the matching [Response] object, or `null` if the response was not receiv## method: Request.serviceWorker* since: v1.24* langs: js+* deprecated: Requests made by a Service Worker are not reported in Playwright.- returns: <[null]|[Worker]>-The Service [Worker] that is performing the request.--**Details**--This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.--Requests originated in a Service Worker do not have a [`method: Request.frame`] available.+This method will always return `null`.## async method: Request.sizes* since: v1.15diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex b8bb07747d..a2c2f27534 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -19134,14 +19134,8 @@ export interface Request {response(): Promise<null|Response>;/**- * The Service {@link Worker} that is performing the request.- *- * **Details**- *- * This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.- *- * Requests originated in a Service Worker do not have a- * [request.frame()](https://playwright.dev/docs/api/class-request#request-frame) available.+ * This method will always return `null`.+ * @deprecated Requests made by a Service Worker are not reported in Playwright.*/serviceWorker(): null|Worker;