Skip to content

Commit 40bed0f

Browse files
authored
docs: fix typos (#1947)
1 parent dc23c56 commit 40bed0f

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@
5858
- Storybooks
5959
1. [Extensibility](./extensibility.md)
6060
- [Custom selector engines](./extensibility.md#custom-selector-engines)
61-
1. [Managing browser binaries](./browsers.md)
61+
1. [Installation](./installation.md)
6262
1. [API Reference](./api.md)

docs/core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ Playwright's [`ElementHandle`](./api.md#class-elementhandle) extends
266266
Handles Lifetime:
267267
- Handles can we be acquired using the page methods [`page.evaluteHandle`](./api.md#pageevaluatehandlepagefunction-arg), [`page.$`](./api.md#pageselector) or [`page.$$`](./api.md#pageselector-1) or
268268
their frame counterparts [`frame.evaluateHandle`](./api.md#frameevaluatehandlepagefunction-arg), [`frame.$`](./api.md#frameselector) or [`frame.$$`](./api.md#frameselector-1).
269-
- Once created, handles will retain object from [grabage collection](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management)
269+
- Once created, handles will retain object from [garbage collection](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management)
270270
- Handles will be **automatically disposed** once the page or frame they belong to navigates or closes.
271271
- Handles can be **manually disposed** using [`jsHandle.dispose`](./api.md#jshandledispose) method.
272272

docs/extensibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Selector engine should have the following properties:
1414
- `query` function to query first element matching `selector` relative to the `root`.
1515
- `queryAll` function to query all elements matching `selector` relative to the `root`.
1616

17-
By default the engine is run directly in the frame's JavaScript context and, for example, can call an application-defined function. To isolate the engine from any JavaScript in the frame, but leave access to the DOM, resgister the engine with `{contentScript: true}` option. Content script engine is safer because it is protected from any tampering with the global objects, for example altering `Node.prototype` methods. All built-in selector engines run as content scripts. Note that running as a content script is not guaranteed when the engine is used together with other custom engines.
17+
By default the engine is run directly in the frame's JavaScript context and, for example, can call an application-defined function. To isolate the engine from any JavaScript in the frame, but leave access to the DOM, register the engine with `{contentScript: true}` option. Content script engine is safer because it is protected from any tampering with the global objects, for example altering `Node.prototype` methods. All built-in selector engines run as content scripts. Note that running as a content script is not guaranteed when the engine is used together with other custom engines.
1818

1919
An example of registering selector engine that queries elements based on a tag name:
2020
```js

docs/input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ ArrowUp, F1 - F12, Digit0 - Digit9, KeyA - KeyZ, etc.
197197

198198
- You can alternatively specify a single character you'd like to produce such as `"a"` or `"#"`.
199199

200-
- Following modification shortcuts are also suported: `Shift, Control, Alt, Meta`.
200+
- Following modification shortcuts are also supported: `Shift, Control, Alt, Meta`.
201201

202202

203203
#### Variations

docs/browsers.md renamed to docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Using these packages is as easy as using a regular Playwright:
8282
$ npm i playwright-webkit
8383
```
8484

85-
2. Requre package
85+
2. Require package
8686

8787
```js
8888
// Notice a proper package name in require

docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Playwright is a cross-browser automation driver for end-to-end testing. Playwrig
66

77
The Playwright API is cross-browser: it works across **Chromium** (used in Chrome, Edge, and many other browsers), **Firefox** and **WebKit** (used in Safari) engines.
88

9-
Playwright is free and open source. Playwright is also modular, and work with any JavaScript test runner framework.
9+
Playwright is free and open source. Playwright is also modular, and works with any JavaScript test runner framework.
1010

1111
### Capabilities
1212

docs/selectors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Selector can be used to obtain `ElementHandle` (see [page.$()](api.md#pageselect
88

99
Selector is a string that consists of one or more clauses separated by `>>` token, e.g. `clause1 >> clause2 >> clause3`. When multiple clauses are present, next one is queried relative to the previous one's result.
1010

11-
Each clause contains a selector engine name and selector body, e.g. `engine=body`. Here `engine` is one of the supported engines (e.g. `css` or a custom one). Selector `body` follows the format of the particular engine, e.g. for `css` engine it should be a [css selector](https://developer.mozilla.org/en/docs/Web/CSS/CSS_Selectors). Body format is assumed to ignore leading and trailing whitespaces, so that extra whitespace can be added for readability. If selector engine needs to include `>>` in the body, it should be escaped inside a string to not be confused with clause separator, e.g. `text="some >> text"`.
11+
Each clause contains a selector engine name and selector body, e.g. `engine=body`. Here `engine` is one of the supported engines (e.g. `css` or a custom one). Selector `body` follows the format of the particular engine, e.g. for `css` engine it should be a [css selector](https://developer.mozilla.org/en/docs/Web/CSS/CSS_Selectors). Body format is assumed to ignore leading and trailing white spaces, so that extra whitespace can be added for readability. If selector engine needs to include `>>` in the body, it should be escaped inside a string to not be confused with clause separator, e.g. `text="some >> text"`.
1212

1313
For example,
1414
```
@@ -61,7 +61,7 @@ const handle = await divHandle.$('css=span');
6161

6262
`css` is a default engine - any malformed selector not starting with `//` nor with `"` is assumed to be a css selector. For example, Playwright converts `page.$('span > button')` to `page.$('css=span > button')`.
6363

64-
`css:light` engine is equivalent to [`Document.querySelector`](https://developer.mozilla.org/en/docs/Web/API/Document/querySelector) and behaves according to the CSS spec. However, it does not pierce shadow roots, which may be incovenient when working with [Shadow DOM and Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). For that reason, `css` engine pierces shadow roots. More specifically, every [Descendant combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_combinator) pierces an arbitrary number of open shadow roots, including the implicit descendant combinator at the start of the selector.
64+
`css:light` engine is equivalent to [`Document.querySelector`](https://developer.mozilla.org/en/docs/Web/API/Document/querySelector) and behaves according to the CSS spec. However, it does not pierce shadow roots, which may be inconvenient when working with [Shadow DOM and Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). For that reason, `css` engine pierces shadow roots. More specifically, every [Descendant combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Descendant_combinator) pierces an arbitrary number of open shadow roots, including the implicit descendant combinator at the start of the selector.
6565

6666
`css` engine first searches for elements in the light dom in the iteration order, and then recursively inside open shadow roots in the iteration order. It does not search inside closed shadow roots or iframes.
6767

@@ -119,4 +119,4 @@ Malformed selector starting with `"` is assumed to be a text selector. For examp
119119

120120
### id, data-testid, data-test-id, data-test and their :light counterparts
121121

122-
Attribute engines are selecting based on the corresponding atrribute value. For example: `data-test-id=foo` is equivalent to `css=[data-test-id="foo"]`, and `id:light=foo` is equivalent to `css:light=[id="foo"]`.
122+
Attribute engines are selecting based on the corresponding attribute value. For example: `data-test-id=foo` is equivalent to `css=[data-test-id="foo"]`, and `id:light=foo` is equivalent to `css:light=[id="foo"]`.

0 commit comments

Comments
 (0)