diff --git a/README.md b/README.md index b64e982f5e..3e606c745f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![npm version](https://img.shields.io/npm/v/playwright.svg?style=flat)](https://www.npmjs.com/package/playwright) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) [![Chromium version](https://img.shields.io/badge/chromium-86.0.4217.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home) [![Firefox version](https://img.shields.io/badge/firefox-78.0b5-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/) [![WebKit version](https://img.shields.io/badge/webkit-14.0-blue.svg?logo=safari)](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.md index 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 contents 1. [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.md index 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.md deleted file mode 100644 index 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. - - diff --git a/docs/input.md b/docs/input.md index 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)