Skip to content

Commit

Permalink
doc: split classes into files (#4864)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Jan 1, 2021
1 parent ba29137 commit e0e836c
Show file tree
Hide file tree
Showing 100 changed files with 9,063 additions and 8,424 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Contributing

<!-- gen:toc -->
- [How to Contribute](#how-to-contribute)
* [Getting Code](#getting-code)
* [Code reviews](#code-reviews)
Expand All @@ -13,7 +12,6 @@
* [Public API Coverage](#public-api-coverage)
- [Contributor License Agreement](#contributor-license-agreement)
* [Code of Conduct](#code-of-conduct)
<!-- gen:stop -->

## How to Contribute

Expand Down
53 changes: 53 additions & 0 deletions docs-src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
id: README
title: "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. Introduction
- [Why Playwright?](./why-playwright.md)
- [Get started](./intro.md)
- [Core concepts](./core-concepts.md)
- [Debugging](./debug.md)
- [Supported languages](./languages.md)
1. Guides
- [Selectors](./selectors.md)
- [Input](./input.md)
- [Emulation](./emulation.md)
- [Network](./network.md)
- [Assertions](./assertions.md)
- [Verification](./verification.md)
- [Navigations](./navigations.md)
- [Multi-page scenarios](./multi-pages.md)
1. Tutorials
- [Authentication](./auth.md)
- [Page object models](./pom.md)
1. Integrations
- [Test runners](./test-runners.md)
- [Docker](./docker/README.md)
- [Continuous integration](./ci.md)
1. Reference
- [API Reference](./api.md)
- [Actionability](./actionability.md)
- [Advanced installation](./installation.md)
- [Extensibility](./extensibility.md)
1. Get help
- [Slack community](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg)
- [Stack Overflow](https://stackoverflow.com/tags/playwright)
- [GitHub](https://github.com/microsoft/playwright/issues)
5 changes: 4 additions & 1 deletion docs-src/actionability.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Actionability
---
id: actionability
title: "Actionability"
---

Playwright does a range of actionability checks on the elements before performing certain actions. These checks ensure that action behaves as expected, for example Playwright does not click on a disabled button.

Expand Down
20 changes: 10 additions & 10 deletions docs-src/api-body.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This object can be used to launch or connect to Firefox, returning instances of
## property: Playwright.selectors
- type: <[Selectors]>

Selectors can be used to install custom selector engines. See [Working with selectors](#working-with-selectors) for more information.
Selectors can be used to install custom selector engines. See [Working with selectors](./selectors.md#working-with-selectors) for more information.

## property: Playwright.webkit
- type: <[BrowserType]>
Expand Down Expand Up @@ -2476,7 +2476,7 @@ console.log(text);
Returns the ElementHandle pointing to the frame element.

The method finds an element matching the specified selector within the frame. See [Working with
selectors](#working-with-selectors) for more details. If no elements match the selector, returns `null`.
selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, returns `null`.

### param: Frame.$.selector = %%-query-selector-%%

Expand All @@ -2486,7 +2486,7 @@ selectors](#working-with-selectors) for more details. If no elements match the s
Returns the ElementHandles pointing to the frame elements.

The method finds all elements matching the specified selector within the frame. See [Working with
selectors](#working-with-selectors) for more details. If no elements match the selector, returns empty array.
selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, returns empty array.

### param: Frame.$$.selector = %%-query-selector-%%

Expand All @@ -2496,7 +2496,7 @@ selectors](#working-with-selectors) for more details. If no elements match the s
Returns the return value of [`param: pageFunction`]

The method finds an element matching the specified selector within the frame and passes it as a first argument to
[`param: pageFunction`]. See [Working with selectors](#working-with-selectors) for more details. If no elements match
[`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more details. If no elements match
the selector, the method throws an error.

If [`param: pageFunction`] returns a [Promise], then `frame.$eval` would wait for the promise to resolve and return
Expand Down Expand Up @@ -2528,7 +2528,7 @@ Optional argument to pass to [`param: pageFunction`]
Returns the return value of [`param: pageFunction`]

The method finds all elements matching the specified selector within the frame and passes an array of matched elements
as a first argument to [`param: pageFunction`]. See [Working with selectors](#working-with-selectors) for more
as a first argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more
details.

If [`param: pageFunction`] returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return
Expand Down Expand Up @@ -3326,15 +3326,15 @@ ElementHandle instances can be used as an argument in [`method: Page.$eval`] and
- returns: <[null]|[ElementHandle]>

The method finds an element matching the specified selector in the `ElementHandle`'s subtree. See [Working with
selectors](#working-with-selectors) for more details. If no elements match the selector, returns `null`.
selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, returns `null`.

### param: ElementHandle.$.selector = %%-query-selector-%%

## async method: ElementHandle.$$
- returns: <[Array]<[ElementHandle]>>

The method finds all elements matching the specified selector in the `ElementHandle`s subtree. See [Working with
selectors](#working-with-selectors) for more details. If no elements match the selector, returns empty array.
selectors](./selectors.md#working-with-selectors) for more details. If no elements match the selector, returns empty array.

### param: ElementHandle.$$.selector = %%-query-selector-%%

Expand All @@ -3344,7 +3344,7 @@ selectors](#working-with-selectors) for more details. If no elements match the s
Returns the return value of [`param: pageFunction`]

The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a first
argument to [`param: pageFunction`]. See [Working with selectors](#working-with-selectors) for more details. If no
argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors) for more details. If no
elements match the selector, the method throws an error.

If [`param: pageFunction`] returns a [Promise], then `frame.$eval` would wait for the promise to resolve and return
Expand Down Expand Up @@ -3376,7 +3376,7 @@ Optional argument to pass to [`param: pageFunction`]
Returns the return value of [`param: pageFunction`]

The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array of
matched elements as a first argument to [`param: pageFunction`]. See [Working with selectors](#working-with-selectors)
matched elements as a first argument to [`param: pageFunction`]. See [Working with selectors](./selectors.md#working-with-selectors)
for more details.

If [`param: pageFunction`] returns a [Promise], then `frame.$$eval` would wait for the promise to resolve and return
Expand Down Expand Up @@ -4650,7 +4650,7 @@ Contains the URL of the response.

# class: Selectors

Selectors can be used to install custom selector engines. See [Working with selectors](#working-with-selectors) for more
Selectors can be used to install custom selector engines. See [Working with selectors](./selectors.md#working-with-selectors) for more
information.

## async method: Selectors.register
Expand Down
157 changes: 0 additions & 157 deletions docs-src/api-footer.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs-src/api-header.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs-src/api-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Whether to bypass the [actionability](./actionability.md) checks. Defaults to `f
- `selector` <[string]>

A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See
[working with selectors](#working-with-selectors) for more details.
[working with selectors](./selectors.md#working-with-selectors) for more details.

## input-position
- `position` <[Object]>
Expand Down Expand Up @@ -85,7 +85,7 @@ defaults to 1. See [UIEvent.detail].
## query-selector
- `selector` <[string]>

A selector to query for. See [working with selectors](#working-with-selectors) for more details.
A selector to query for. See [working with selectors](./selectors.md#working-with-selectors) for more details.

## wait-for-selector-state
- `state` <"attached"|"detached"|"visible"|"hidden">
Expand Down
10 changes: 5 additions & 5 deletions docs-src/assertions.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Assertions
---
id: assertions
title: "Assertions"
---

The Playwright API can be used to read element contents and properties for test assertions. These values are fetched from the browser page and asserted in
Node.js.

The examples in this guide use the built-in [`assert` module](https://nodejs.org/api/assert.html), but they can be used with any assertion library (like [Expect](https://www.npmjs.com/package/expect) or [Chai](https://www.npmjs.com/package/chai)). See [Test runners](test-runners.md) for more info.

<!-- GEN:toc-top-level -->
<!-- GEN:stop -->

<br/>
<!-- TOC -->

## Common patterns

Expand Down
9 changes: 6 additions & 3 deletions docs-src/auth.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Authentication
---
id: auth
title: "Authentication"
---

Playwright can be used to automate scenarios that require authentication.

Tests written with Playwright execute in isolated clean-slate environments called
Expand All @@ -11,8 +15,7 @@ login in every context and speeds up test execution.
app UI). For [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication)
use [`browser.newContext`](./network.md#http-authentication).

<!-- GEN:toc -->
<!-- GEN:stop -->
<!-- TOC -->

## Automate logging in

Expand Down
Loading

0 comments on commit e0e836c

Please sign in to comment.