Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): fix some formatting in Playwright.md #4066

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions docs/helpers/Playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,9 @@ I.checkOption('agree', '//form');
- `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
- `options`

Returns **void** automatically synchronized promise through #recorder[Additional options][15] for check available as 3rd argument.Examples:```js
Returns **void** automatically synchronized promise through #recorder.
[Additional options][15] for check available as 3rd argument.Examples:
```js
// click on element at position
I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
```> ⚠️ To avoid flakiness, option `force: true` is set by default
Expand Down Expand Up @@ -592,7 +594,8 @@ I.click({css: 'nav a.login'});

- `locator` **([string][9] | [object][6])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
- `context` **([string][9]? | [object][6] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
- `options` **any?** [Additional options][18] for click available as 3rd argument.Examples:```js
- `options` **any?** [Additional options][18] for click available as 3rd argument.Examples:
```js
// click on element at position
I.click('canvas', '.model', { position: { x: 20, y: 40 } })

Expand Down Expand Up @@ -1351,7 +1354,8 @@ Returns full URL of request matching parameter "urlMatch".

#### Parameters

- `urlMatch` **([string][9] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:```js
- `urlMatch` **([string][9] | [RegExp][11])** Expected URL of request in network traffic. Can be a string or a regular expression.Examples:
```js
I.grabTrafficUrl('https://api.example.com/session');
I.grabTrafficUrl(/session.*start/);
```
Expand Down Expand Up @@ -1680,12 +1684,13 @@ First parameter can be set to `maximize`.
- `width` **[number][20]** width in pixels or `maximize`.
- `height` **[number][20]** height in pixels.

Returns **void** automatically synchronized promise through #recorderUnlike other drivers Playwright changes the size of a viewport, not the window!
Returns **void** automatically synchronized promise through #recorder.
Unlike other drivers Playwright changes the size of a viewport, not the window!
Playwright does not control the window of a browser so it can't adjust its real size.
It also can't maximize a window.Update configuration to change real window size on start:```js
// inside codecept.conf.js
// @codeceptjs/configure package must be installed
{ setWindowSize } = require('@codeceptjs/configure');
It also can't maximize a window.Update configuration to change real window size on start:
```js
I.resizeWindow(640, 480);
I.resizeWindow('maximize');
```

### restartBrowser
Expand Down Expand Up @@ -2305,10 +2310,14 @@ I.uncheckOption('agree', '//form');
- `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
- `options`

Returns **void** automatically synchronized promise through #recorder[Additional options][37] for uncheck available as 3rd argument.Examples:```js
Returns **void** automatically synchronized promise through #recorder.
[Additional options][37] for uncheck available as 3rd argument.
Examples:
```js
// click on element at position
I.uncheckOption('Agree', '.signup', { position: { x: 5, y: 5 } })
```> ⚠️ To avoid flakiness, option `force: true` is set by default
```
> ⚠️ To avoid flakiness, option `force: true` is set by default

### usePlaywrightTo

Expand Down Expand Up @@ -2544,7 +2553,8 @@ I.waitForVisible('#popup');
- `locator` **([string][9] | [object][6])** element located by CSS|XPath|strict locator.
- `sec` **[number][20]** (optional, `1` by default) time in seconds to wait

Returns **void** automatically synchronized promise through #recorderThis method accepts [React selectors][43].
Returns **void** automatically synchronized promise through #recorder.
This method accepts [React selectors][43].

### waitInUrl

Expand Down