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: update docs (#3253)
Dmitry Gozman928a1769ef5a
diff --git a/README.md b/README.mdindex b64e982f5e..3e606c745f 100644--- a/README.md+++ b/README.md@@ -2,7 +2,7 @@[](https://www.npmjs.com/package/playwright) [](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) <!-- GEN:chromium-version-badge -->[](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> [](https://webkit.org/)-##### [Docs](https://playwright.dev/#?path=docs/README.md) | [API reference](https://playwright.dev/#?path=docs/api.md) | [Changelog](https://github.com/microsoft/playwright/releases)+## [Documentation](https://playwright.dev/#?path=docs/README.md) | [API reference](https://playwright.dev/#?path=docs/api.md)Playwright is a Node.js library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.@@ -136,6 +136,6 @@ const { webkit } = require('playwright');* [Documentation](https://playwright.dev/#?path=docs/README.md)* [API reference](https://playwright.dev/#?path=docs/api.md)-* [Example recipes](https://playwright.dev/#?path=docs/examples/README.md)-* [Contributing](CONTRIBUTING.md)* [Community showcase](https://playwright.dev/#?path=docs/showcase.md)+* [Contribution guide](CONTRIBUTING.md)+* [Changelog](https://github.com/microsoft/playwright/releases)diff --git a/docs/README.md b/docs/README.mdindex 80fdb92e64..4925f2edaa 100644--- a/docs/README.md+++ b/docs/README.md@@ -1,5 +1,20 @@# Documentation+### Capabilities++Playwright is a library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.++* Ever-green browser engines+* Headless execution+* Scenarios that span multiple pages, domains and iframes+* Auto-wait for elements to be ready before executing actions (like click, fill)+* Reliable signals instead of timeouts (like network response, popup, navigation)+* Intercept network activity for stubbing and mocking network requests+* Emulate mobile devices, geolocation, permissions+* Support for web components via shadow-piercing selectors+* Native input events for mouse and keyboard+* Upload and download files+### Table of contents1. [Getting Started](./intro.md)@@ -82,4 +97,4 @@1. [Actionability](./actionability.md)1. [Extensibility](./extensibility.md)- [Custom selector engines](./extensibility.md#custom-selector-engines)-1. [API Reference](./api.md)\ No newline at end of file+1. [API Reference](./api.md)diff --git a/docs/core-concepts.md b/docs/core-concepts.mdindex 7a97d78545..7e1f7ebaff 100644--- a/docs/core-concepts.md+++ b/docs/core-concepts.md@@ -70,6 +70,10 @@ const context = await browser.newContext({});```+#### Example++[This script](examples/authentication.js) logs in on GitHub.com through Chromium, and then reuses the login cookies state in WebKit. This recipe can be used to speed up tests by logging in once and reusing login state.+#### API reference- [class `BrowserContext`](./api.md#class-browsercontext)diff --git a/docs/examples/README.md b/docs/examples/README.mddeleted file mode 100644index 466c1089dc..0000000000--- a/docs/examples/README.md+++ /dev/null@@ -1,18 +0,0 @@-# Example recipes--### [Authentication](authentication.js)--This script logs in on GitHub.com through Chromium, and then reuses the login cookies state in WebKit. This recipe can be used to speed up tests by logging in once and reusing login state.--### [File uploads](upload.js)--This script uploads a file to an `input` element that accepts file uploads.--<!---Other examples-* Request interception/server response stub/mock-* Geolocation and mobile emulation-* Handling a popup, eg, accept dialog-* Page navigation and wait for load- * Async page load (see #662)--->diff --git a/docs/input.md b/docs/input.mdindex 9c2fd558fb..cf79b4c0a4 100644--- a/docs/input.md+++ b/docs/input.md@@ -251,6 +251,10 @@ await page.setInputFiles('input#upload', {You can select input files for upload using the `page.setInputFiles` method. It expects first argument to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) with the type `"file"`. Multiple files can be passed in the array. If some of the file paths are relative, they are resolved relative to the [current working directory](https://nodejs.org/api/process.html#process_process_cwd). Empty array clears the selected files.+#### Example++[This script](examples/upload.js) uploads a file to an `input` element that accepts file uploads.+#### API reference- [page.setInputFiles(selector, files[, options])](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagesetinputfilesselector-value-options)