Skip to content

Commit 1501b70

Browse files
committed
DOC: Autogenerate and update documentation
1 parent 04ae7f0 commit 1501b70

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

docs/helpers/Playwright.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,15 +1682,19 @@ I.mockTraffic([/^https://api.example.com/v1/, 'https://api.example.com/v2/**'],
16821682
Moves cursor to element matched by locator.
16831683
Extra shift can be set with offsetX and offsetY options.
16841684

1685+
An optional `context` (as a second parameter) can be specified to narrow the search to an element within a parent.
1686+
When the second argument is a non-number (string or locator object), it is treated as context.
1687+
16851688
```js
16861689
I.moveCursorTo('.tooltip');
16871690
I.moveCursorTo('#submit', 5,5);
1691+
I.moveCursorTo('#submit', '.container');
16881692
```
16891693

16901694
#### Parameters
16911695

16921696
* `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
1693-
* `offsetX` **[number][17]** (optional, `0` by default) X-axis offset.
1697+
* `offsetX` **([number][17] | [string][9] | [object][6])** (optional, `0` by default) X-axis offset or context locator.
16941698
* `offsetY` **[number][17]** (optional, `0` by default) Y-axis offset.
16951699

16961700
Returns **void** automatically synchronized promise through #recorder

docs/helpers/Puppeteer.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,15 +1472,19 @@ This method allows intercepting and mocking requests & responses. [Learn more ab
14721472
Moves cursor to element matched by locator.
14731473
Extra shift can be set with offsetX and offsetY options.
14741474
1475+
An optional `context` (as a second parameter) can be specified to narrow the search to an element within a parent.
1476+
When the second argument is a non-number (string or locator object), it is treated as context.
1477+
14751478
```js
14761479
I.moveCursorTo('.tooltip');
14771480
I.moveCursorTo('#submit', 5,5);
1481+
I.moveCursorTo('#submit', '.container');
14781482
```
14791483
14801484
#### Parameters
14811485
14821486
* `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
1483-
* `offsetX` **[number][10]** (optional, `0` by default) X-axis offset.
1487+
* `offsetX` **([number][10] | [string][6] | [object][4])** (optional, `0` by default) X-axis offset or context locator.
14841488
* `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
14851489
14861490
Returns **void** automatically synchronized promise through #recorder

docs/helpers/WebDriver.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,17 +1541,21 @@ Returns **[Promise][23]<any>** WebElement of being used Web helper
15411541
Moves cursor to element matched by locator.
15421542
Extra shift can be set with offsetX and offsetY options.
15431543
1544+
An optional `context` (as a second parameter) can be specified to narrow the search to an element within a parent.
1545+
When the second argument is a non-number (string or locator object), it is treated as context.
1546+
15441547
```js
15451548
I.moveCursorTo('.tooltip');
15461549
I.moveCursorTo('#submit', 5,5);
1550+
I.moveCursorTo('#submit', '.container');
15471551
```
15481552
15491553
#### Parameters
15501554
15511555
* `locator` **([string][18] | [object][17])** located by CSS|XPath|strict locator.
15521556
* `xOffset` &#x20;
15531557
* `yOffset` &#x20;
1554-
* `offsetX` **[number][22]** (optional, `0` by default) X-axis offset.
1558+
* `offsetX` **([number][22] | [string][18] | [object][17])** (optional, `0` by default) X-axis offset or context locator.
15551559
* `offsetY` **[number][22]** (optional, `0` by default) Y-axis offset.
15561560
15571561
Returns **void** automatically synchronized promise through #recorder

0 commit comments

Comments
 (0)