Skip to content

Commit

Permalink
doc: further align docs w/ playwright.dev (#4866)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Jan 3, 2021
1 parent e0e836c commit ae935a4
Show file tree
Hide file tree
Showing 98 changed files with 659 additions and 473 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish_canary_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
- release-*
paths:
- docs/docker/**
- utils/docker/**
- browsers.json
- .github/workflows/publish_canary_docker.yml

Expand All @@ -29,12 +29,12 @@ jobs:
node-version: 10.15
- run: npm ci
- run: npm run build
- run: ./docs/docker/build.sh bionic playwright:localbuild-bionic
- run: ./docs/docker/build.sh focal playwright:localbuild-focal
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
- run: ./utils/docker/build.sh focal playwright:localbuild-focal
- name: tag & publish
run: |
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:next
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:next-bionic
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:sha-${{ github.sha }}
./docs/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:next-focal
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:next
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:next-bionic
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:sha-${{ github.sha }}
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:next-focal
16 changes: 8 additions & 8 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ jobs:
node-version: 10.15
- run: npm ci
- run: npm run build
- run: ./docs/docker/build.sh bionic playwright:localbuild-bionic
- run: ./docs/docker/build.sh focal playwright:localbuild-focal
- run: ./utils/docker/build.sh bionic playwright:localbuild-bionic
- run: ./utils/docker/build.sh focal playwright:localbuild-focal
- name: tag & publish
run: |
# GITHUB_REF has a form of `refs/tags/v1.3.0`.
# TAG_NAME would be `v1.3.0`
TAG_NAME=${GITHUB_REF#refs/tags/}
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:latest
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:bionic
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}
./docs/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}-bionic
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:latest
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:bionic
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}
./utils/docker/tag_and_push.sh playwright:localbuild-bionic playwright.azurecr.io/public/playwright:${TAG_NAME}-bionic
./docs/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:focal
./docs/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:${TAG_NAME}-focal
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:focal
./utils/docker/tag_and_push.sh playwright:localbuild-focal playwright.azurecr.io/public/playwright:${TAG_NAME}-focal
5 changes: 3 additions & 2 deletions docs/README.md → docs/out/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@ Playwright is a library to automate [Chromium](https://www.chromium.org/Home), [
- [Page object models](./pom.md)
1. Integrations
- [Test runners](./test-runners.md)
- [Docker](./docker/README.md)
- [Docker](././docker.md)
- [Continuous integration](./ci.md)
1. Reference
- [API Reference](./api.md)
- [API Reference](./api/class-playwright.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)

[Playwright]: api/class-playwright.md "Playwright"
[Browser]: api/class-browser.md "Browser"
[BrowserContext]: api/class-browsercontext.md "BrowserContext"
Expand Down
15 changes: 8 additions & 7 deletions docs/actionability.md → docs/out/actionability.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Some actions like `page.click()` support `{force: true}` option that disable non

| Actions | Performed checks |
| ------ | ------- |
| `check()`<br>`click()`<br>`dblclick()`<br>`tap()`<br>`uncheck()` | [Visible]<br>[Stable]<br>[Enabled]<br>[Receiving Events]<br>[Attached] |
| `hover()` | [Visible]<br>[Stable]<br>[Receiving Events]<br>[Attached] |
| `fill()` | [Visible]<br>[Enabled]<br>[Editable]<br>[Attached] |
| `dispatchEvent()`<br>`focus()`<br>`press()`<br>`setInputFiles()`<br>`selectOption()`<br>`type()` | [Attached] |
| `scrollIntoViewIfNeeded()`<br>`screenshot()` | [Visible]<br>[Stable]<br>[Attached] |
| `selectText()` | [Visible]<br>[Attached] |
| `getAttribute()`<br>`innerText()`<br>`innerHTML()`<br>`textContent()` | [Attached] |
| `check()`<br></br>`click()`<br></br>`dblclick()`<br></br>`tap()`<br></br>`uncheck()` | [Visible]<br></br>[Stable]<br></br>[Enabled]<br></br>[Receiving Events]<br></br>[Attached] |
| `hover()` | [Visible]<br></br>[Stable]<br></br>[Receiving Events]<br></br>[Attached] |
| `fill()` | [Visible]<br></br>[Enabled]<br></br>[Editable]<br></br>[Attached] |
| `dispatchEvent()`<br></br>`focus()`<br></br>`press()`<br></br>`setInputFiles()`<br></br>`selectOption()`<br></br>`type()` | [Attached] |
| `scrollIntoViewIfNeeded()`<br></br>`screenshot()` | [Visible]<br></br>[Stable]<br></br>[Attached] |
| `selectText()` | [Visible]<br></br>[Attached] |
| `getAttribute()`<br></br>`innerText()`<br></br>`innerHTML()`<br></br>`textContent()` | [Attached] |

### Visible

Expand Down Expand Up @@ -57,6 +57,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[Editable]: #editable "Editable"
[Receiving Events]: #receiving-events "Receiving Events"
[Attached]: #attached "Attached"

[Playwright]: api/class-playwright.md "Playwright"
[Browser]: api/class-browser.md "Browser"
[BrowserContext]: api/class-browsercontext.md "BrowserContext"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: class-accessibility
title: "class: Accessibility"
title: "Accessibility"
---


Expand All @@ -15,7 +15,7 @@ Most of the accessibility tree gets filtered out when converting from Blink AX T

- [accessibility.snapshot([options])](api/class-accessibility.md#accessibilitysnapshotoptions)

#### accessibility.snapshot([options])
## accessibility.snapshot([options])
- `options` <[Object]>
- `interestingOnly` <[boolean]> Prune uninteresting nodes from the tree. Defaults to `true`.
- `root` <[ElementHandle]> The root DOM element for the snapshot. Defaults to the whole page.
Expand Down Expand Up @@ -76,6 +76,7 @@ function findFocusedNode(node) {
}
```


[Playwright]: api/class-playwright.md "Playwright"
[Browser]: api/class-browser.md "Browser"
[BrowserContext]: api/class-browsercontext.md "BrowserContext"
Expand Down
17 changes: 9 additions & 8 deletions docs/class-browser.md → docs/out/api/class-browser.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: class-browser
title: "class: Browser"
title: "Browser"
---

* extends: [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter)
Expand Down Expand Up @@ -31,13 +31,13 @@ See [ChromiumBrowser], [FirefoxBrowser] and [WebKitBrowser] for browser-specific
- [browser.newPage([options])](api/class-browser.md#browsernewpageoptions)
- [browser.version()](api/class-browser.md#browserversion)

#### browser.on('disconnected')
## browser.on('disconnected')

Emitted when Browser gets disconnected from the browser application. This might happen because of one of the following:
* Browser application is closed or crashed.
* The [browser.close()](api/class-browser.md#browserclose) method was called.

#### browser.close()
## browser.close()
- returns: <[Promise]>

In case this browser is obtained using [browserType.launch([options])](api/class-browsertype.md#browsertypelaunchoptions), closes the browser and all of its pages (if any were opened).
Expand All @@ -46,7 +46,7 @@ In case this browser is obtained using [browserType.connect(params)](api/class-b

The [Browser] object itself is considered to be disposed and cannot be used anymore.

#### browser.contexts()
## browser.contexts()
- returns: <[Array]<[BrowserContext]>>

Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts.
Expand All @@ -59,12 +59,12 @@ const context = await browser.newContext();
console.log(browser.contexts().length); // prints `1`
```

#### browser.isConnected()
## browser.isConnected()
- returns: <[boolean]>

Indicates that the browser is connected.

#### browser.newContext([options])
## browser.newContext([options])
- `options` <[Object]>
- `acceptDownloads` <[boolean]> Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
- `bypassCSP` <[boolean]> Toggles bypassing page's Content-Security-Policy.
Expand Down Expand Up @@ -139,7 +139,7 @@ Creates a new browser context. It won't share cookies/cache with other browser c
})();
```

#### browser.newPage([options])
## browser.newPage([options])
- `options` <[Object]>
- `acceptDownloads` <[boolean]> Whether to automatically download all the attachments. Defaults to `false` where all the downloads are canceled.
- `bypassCSP` <[boolean]> Toggles bypassing page's Content-Security-Policy.
Expand Down Expand Up @@ -205,10 +205,11 @@ Creates a new page in a new browser context. Closing this page will close the co

This is a convenience API that should only be used for the single-page scenarios and short snippets. Production code and testing frameworks should explicitly create [browser.newContext([options])](api/class-browser.md#browsernewcontextoptions) followed by the [browserContext.newPage()](api/class-browsercontext.md#browsercontextnewpage) to control their exact life times.

#### browser.version()
## browser.version()
- returns: <[string]>

Returns the browser version.

[Playwright]: api/class-playwright.md "Playwright"
[Browser]: api/class-browser.md "Browser"
[BrowserContext]: api/class-browsercontext.md "BrowserContext"
Expand Down
Loading

0 comments on commit ae935a4

Please sign in to comment.