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: fix `browser.contexts()` description (#1220)
Yury Semikhatsky2d4317dc9ae2
diff --git a/docs/api.md b/docs/api.mdindex 4cdbd3dd6c..3061097813 100644--- a/docs/api.md+++ b/docs/api.md@@ -173,8 +173,16 @@ The [Browser] object itself is considered to be disposed and cannot be used anym#### browser.contexts()- returns: <[Array]<[BrowserContext]>>-Returns an array of all open browser contexts. In a newly created browser, this will return-a single instance of [BrowserContext].+Returns an array of all open browser contexts. In a newly created browser, this will return zero+browser contexts.++```js+const browser = await pw.webkit.launch();+console.log(browser.contexts().length); // prints `0`++const context = await browser.newContext();+console.log(browser.contexts().length); // prints `1`+```#### browser.isConnected()