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(context): document the `browser()` call from persistent context (#36216)
Adam Gastineau2bc8ed0fc97f
diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.mdindex afd73a4142..add918f234 100644--- a/docs/src/api/class-browsercontext.md+++ b/docs/src/api/class-browsercontext.md@@ -467,7 +467,7 @@ All existing background pages in the context.* since: v1.8- returns: <[null]|[Browser]>-Returns the browser instance of the context. If it was launched as a persistent context null gets returned.+Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal browser, e.g. Android or Electron.## async method: BrowserContext.clearCookies* since: v1.8diff --git a/packages/playwright-client/types/types.d.ts b/packages/playwright-client/types/types.d.tsindex efe7626b23..aaf8a14c42 100644--- a/packages/playwright-client/types/types.d.ts+++ b/packages/playwright-client/types/types.d.ts@@ -8840,7 +8840,8 @@ export interface BrowserContext {backgroundPages(): Array<Page>;/**- * Returns the browser instance of the context. If it was launched as a persistent context null gets returned.+ * Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal+ * browser, e.g. Android or Electron.*/browser(): null|Browser;diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.tsindex efe7626b23..aaf8a14c42 100644--- a/packages/playwright-core/types/types.d.ts+++ b/packages/playwright-core/types/types.d.ts@@ -8840,7 +8840,8 @@ export interface BrowserContext {backgroundPages(): Array<Page>;/**- * Returns the browser instance of the context. If it was launched as a persistent context null gets returned.+ * Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal+ * browser, e.g. Android or Electron.*/browser(): null|Browser;