Skip to content

Commit 4a8b962

Browse files
committed
DOC: Autogenerate and update documentation
1 parent 83bb3c5 commit 4a8b962

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed

docs/helpers/Appium.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,13 +960,17 @@ Returns **void** automatically synchronized promise through #recorder
960960

961961
Opposite to `seeElement`. Checks that element is not visible (or in DOM)
962962

963+
The second parameter is a context (CSS or XPath locator) to narrow the search.
964+
963965
```js
964966
I.dontSeeElement('.modal'); // modal is not shown
967+
I.dontSeeElement('.modal', '#container');
965968
```
966969

967970
#### Parameters
968971

969972
* `locator` **([string][5] | [object][11])** located by CSS|XPath|Strict locator.
973+
* `context` **([string][5]? | [object][11])** (optional, `null` by default) element located by CSS | XPath | strict locator. (optional, default `null`)
970974

971975
Returns **void** automatically synchronized promise through #recorder
972976

@@ -1009,6 +1013,8 @@ Returns **void** automatically synchronized promise through #recorder
10091013
Fills a text field or textarea, after clearing its value, with the given string.
10101014
Field is located by name, label, CSS, or XPath.
10111015

1016+
The third parameter is a context (CSS or XPath locator) to narrow the search.
1017+
10121018
```js
10131019
// by label
10141020
I.fillField('Email', 'hello@world.com');
@@ -1018,12 +1024,15 @@ I.fillField('password', secret('123456'));
10181024
I.fillField('form#login input[name=username]', 'John');
10191025
// or by strict locator
10201026
I.fillField({css: 'form#login input[name=username]'}, 'John');
1027+
// within a context
1028+
I.fillField('Name', 'John', '#section2');
10211029
```
10221030

10231031
#### Parameters
10241032

10251033
* `field` **([string][5] | [object][11])** located by label|name|CSS|XPath|strict locator.
10261034
* `value` **([string][5] | [object][11])** text value to fill.
1035+
* `context` **([string][5]? | [object][11])** (optional, `null` by default) element located by CSS | XPath | strict locator. (optional, default `null`)
10271036

10281037
Returns **void** automatically synchronized promise through #recorder
10291038

@@ -1194,13 +1203,17 @@ Returns **void** automatically synchronized promise through #recorder
11941203
Checks that a given Element is visible
11951204
Element is located by CSS or XPath.
11961205

1206+
The second parameter is a context (CSS or XPath locator) to narrow the search.
1207+
11971208
```js
11981209
I.seeElement('#modal');
1210+
I.seeElement('#modal', '#container');
11991211
```
12001212

12011213
#### Parameters
12021214

12031215
* `locator` **([string][5] | [object][11])** located by CSS|XPath|strict locator.
1216+
* `context` **([string][5]? | [object][11])** (optional, `null` by default) element located by CSS | XPath | strict locator. (optional, default `null`)
12041217

12051218
Returns **void** automatically synchronized promise through #recorder
12061219

@@ -1247,13 +1260,17 @@ Selects an option in a drop-down select.
12471260
Field is searched by label | name | CSS | XPath.
12481261
Option is selected by visible text or by value.
12491262

1263+
The third parameter is a context (CSS or XPath locator) to narrow the search.
1264+
12501265
```js
12511266
I.selectOption('Choose Plan', 'Monthly'); // select by label
12521267
I.selectOption('subscription', 'Monthly'); // match option by text
12531268
I.selectOption('subscription', '0'); // or by value
12541269
I.selectOption('//form/select[@name=account]','Premium');
12551270
I.selectOption('form select[name=account]', 'Premium');
12561271
I.selectOption({css: 'form select[name=account]'}, 'Premium');
1272+
// within a context
1273+
I.selectOption('age', '21-60', '#section2');
12571274
```
12581275

12591276
Provide an array for the second argument to select multiple options.
@@ -1266,6 +1283,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
12661283

12671284
* `select` **([string][5] | [object][11])** field located by label|name|CSS|XPath|strict locator.
12681285
* `option` **([string][5] | [Array][8]\<any>)** visible text or value of option.
1286+
* `context` **([string][5]? | [object][11])** (optional, `null` by default) element located by CSS | XPath | strict locator. (optional, default `null`)
12691287

12701288
Returns **void** automatically synchronized promise through #recorderSupported only for web testing
12711289

docs/helpers/Playwright.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,13 +775,17 @@ Returns **void** automatically synchronized promise through #recorder
775775

776776
Opposite to `seeElement`. Checks that element is not visible (or in DOM)
777777

778+
The second parameter is a context (CSS or XPath locator) to narrow the search.
779+
778780
```js
779781
I.dontSeeElement('.modal'); // modal is not shown
782+
I.dontSeeElement('.modal', '#container');
780783
```
781784

782785
#### Parameters
783786

784787
* `locator` **([string][9] | [object][6])** located by CSS|XPath|Strict locator.
788+
* `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
785789

786790
Returns **void** automatically synchronized promise through #recorder
787791

@@ -969,6 +973,8 @@ Returns **[Promise][20]<any>**&#x20;
969973
Fills a text field or textarea, after clearing its value, with the given string.
970974
Field is located by name, label, CSS, or XPath.
971975

976+
The third parameter is a context (CSS or XPath locator) to narrow the search.
977+
972978
```js
973979
// by label
974980
I.fillField('Email', 'hello@world.com');
@@ -978,12 +984,15 @@ I.fillField('password', secret('123456'));
978984
I.fillField('form#login input[name=username]', 'John');
979985
// or by strict locator
980986
I.fillField({css: 'form#login input[name=username]'}, 'John');
987+
// within a context
988+
I.fillField('Name', 'John', '#section2');
981989
```
982990

983991
#### Parameters
984992

985993
* `field` **([string][9] | [object][6])** located by label|name|CSS|XPath|strict locator.
986994
* `value` **([string][9] | [object][6])** text value to fill.
995+
* `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
987996

988997
Returns **void** automatically synchronized promise through #recorder
989998

@@ -2048,13 +2057,17 @@ Returns **void** automatically synchronized promise through #recorder
20482057
Checks that a given Element is visible
20492058
Element is located by CSS or XPath.
20502059

2060+
The second parameter is a context (CSS or XPath locator) to narrow the search.
2061+
20512062
```js
20522063
I.seeElement('#modal');
2064+
I.seeElement('#modal', '#container');
20532065
```
20542066

20552067
#### Parameters
20562068

20572069
* `locator` **([string][9] | [object][6])** located by CSS|XPath|strict locator.
2070+
* `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
20582071

20592072
Returns **void** automatically synchronized promise through #recorder
20602073

@@ -2259,13 +2272,17 @@ Selects an option in a drop-down select.
22592272
Field is searched by label | name | CSS | XPath.
22602273
Option is selected by visible text or by value.
22612274

2275+
The third parameter is a context (CSS or XPath locator) to narrow the search.
2276+
22622277
```js
22632278
I.selectOption('Choose Plan', 'Monthly'); // select by label
22642279
I.selectOption('subscription', 'Monthly'); // match option by text
22652280
I.selectOption('subscription', '0'); // or by value
22662281
I.selectOption('//form/select[@name=account]','Premium');
22672282
I.selectOption('form select[name=account]', 'Premium');
22682283
I.selectOption({css: 'form select[name=account]'}, 'Premium');
2284+
// within a context
2285+
I.selectOption('age', '21-60', '#section2');
22692286
```
22702287

22712288
Provide an array for the second argument to select multiple options.
@@ -2278,6 +2295,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
22782295

22792296
* `select` **([string][9] | [object][6])** field located by label|name|CSS|XPath|strict locator.
22802297
* `option` **([string][9] | [Array][10]<any>)** visible text or value of option.
2298+
* `context` **([string][9]? | [object][6])** (optional, `null` by default) element located by CSS | XPath | strict locator.
22812299

22822300
Returns **void** automatically synchronized promise through #recorder
22832301

docs/helpers/Puppeteer.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,13 +658,17 @@ Returns **void** automatically synchronized promise through #recorder
658658

659659
Opposite to `seeElement`. Checks that element is not visible (or in DOM)
660660

661+
The second parameter is a context (CSS or XPath locator) to narrow the search.
662+
661663
```js
662664
I.dontSeeElement('.modal'); // modal is not shown
665+
I.dontSeeElement('.modal', '#container');
663666
```
664667

665668
#### Parameters
666669

667670
* `locator` **([string][6] | [object][4])** located by CSS|XPath|Strict locator.
671+
* `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
668672

669673
Returns **void** automatically synchronized promise through #recorder
670674

@@ -903,6 +907,8 @@ Returns **[Promise][11]<any>** script return value
903907
Fills a text field or textarea, after clearing its value, with the given string.
904908
Field is located by name, label, CSS, or XPath.
905909
910+
The third parameter is a context (CSS or XPath locator) to narrow the search.
911+
906912
```js
907913
// by label
908914
I.fillField('Email', 'hello@world.com');
@@ -912,12 +918,15 @@ I.fillField('password', secret('123456'));
912918
I.fillField('form#login input[name=username]', 'John');
913919
// or by strict locator
914920
I.fillField({css: 'form#login input[name=username]'}, 'John');
921+
// within a context
922+
I.fillField('Name', 'John', '#section2');
915923
```
916924
917925
#### Parameters
918926
919927
* `field` **([string][6] | [object][4])** located by label|name|CSS|XPath|strict locator.
920928
* `value` **([string][6] | [object][4])** text value to fill.
929+
* `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
921930
922931
Returns **void** automatically synchronized promise through #recorder
923932
@@ -1816,13 +1825,17 @@ Returns **void** automatically synchronized promise through #recorder
18161825
Checks that a given Element is visible
18171826
Element is located by CSS or XPath.
18181827
1828+
The second parameter is a context (CSS or XPath locator) to narrow the search.
1829+
18191830
```js
18201831
I.seeElement('#modal');
1832+
I.seeElement('#modal', '#container');
18211833
```
18221834
18231835
#### Parameters
18241836
18251837
* `locator` **([string][6] | [object][4])** located by CSS|XPath|strict locator.
1838+
* `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
18261839
18271840
Returns **void** automatically synchronized promise through #recorder
18281841
@@ -2039,13 +2052,17 @@ Selects an option in a drop-down select.
20392052
Field is searched by label | name | CSS | XPath.
20402053
Option is selected by visible text or by value.
20412054
2055+
The third parameter is a context (CSS or XPath locator) to narrow the search.
2056+
20422057
```js
20432058
I.selectOption('Choose Plan', 'Monthly'); // select by label
20442059
I.selectOption('subscription', 'Monthly'); // match option by text
20452060
I.selectOption('subscription', '0'); // or by value
20462061
I.selectOption('//form/select[@name=account]','Premium');
20472062
I.selectOption('form select[name=account]', 'Premium');
20482063
I.selectOption({css: 'form select[name=account]'}, 'Premium');
2064+
// within a context
2065+
I.selectOption('age', '21-60', '#section2');
20492066
```
20502067
20512068
Provide an array for the second argument to select multiple options.
@@ -2058,6 +2075,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
20582075
20592076
* `select` **([string][6] | [object][4])** field located by label|name|CSS|XPath|strict locator.
20602077
* `option` **([string][6] | [Array][16]<any>)** visible text or value of option.
2078+
* `context` **([string][6]? | [object][4])** (optional, `null` by default) element located by CSS | XPath | strict locator.
20612079
20622080
Returns **void** automatically synchronized promise through #recorder
20632081

docs/helpers/WebDriver.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,13 +830,17 @@ Returns **void** automatically synchronized promise through #recorder
830830

831831
Opposite to `seeElement`. Checks that element is not visible (or in DOM)
832832

833+
The second parameter is a context (CSS or XPath locator) to narrow the search.
834+
833835
```js
834836
I.dontSeeElement('.modal'); // modal is not shown
837+
I.dontSeeElement('.modal', '#container');
835838
```
836839

837840
#### Parameters
838841

839842
* `locator` **([string][18] | [object][17])** located by CSS|XPath|Strict locator.
843+
* `context` **([string][18]? | [object][17])** (optional, `null` by default) element located by CSS | XPath | strict locator.
840844

841845
Returns **void** automatically synchronized promise through #recorder
842846

@@ -1040,6 +1044,8 @@ Returns **[Promise][23]<any>** script return value
10401044
Fills a text field or textarea, after clearing its value, with the given string.
10411045
Field is located by name, label, CSS, or XPath.
10421046
1047+
The third parameter is a context (CSS or XPath locator) to narrow the search.
1048+
10431049
```js
10441050
// by label
10451051
I.fillField('Email', 'hello@world.com');
@@ -1049,12 +1055,15 @@ I.fillField('password', secret('123456'));
10491055
I.fillField('form#login input[name=username]', 'John');
10501056
// or by strict locator
10511057
I.fillField({css: 'form#login input[name=username]'}, 'John');
1058+
// within a context
1059+
I.fillField('Name', 'John', '#section2');
10521060
```
10531061
10541062
#### Parameters
10551063
10561064
* `field` **([string][18] | [object][17])** located by label|name|CSS|XPath|strict locator.
10571065
* `value` **([string][18] | [object][17])** text value to fill.
1066+
* `context` **([string][18]? | [object][17])** (optional, `null` by default) element located by CSS | XPath | strict locator.
10581067
10591068
Returns **void** automatically synchronized promise through #recorder
10601069
@@ -1924,13 +1933,17 @@ Returns **void** automatically synchronized promise through #recorder
19241933
Checks that a given Element is visible
19251934
Element is located by CSS or XPath.
19261935
1936+
The second parameter is a context (CSS or XPath locator) to narrow the search.
1937+
19271938
```js
19281939
I.seeElement('#modal');
1940+
I.seeElement('#modal', '#container');
19291941
```
19301942
19311943
#### Parameters
19321944
19331945
* `locator` **([string][18] | [object][17])** located by CSS|XPath|strict locator.
1946+
* `context` **([string][18]? | [object][17])** (optional, `null` by default) element located by CSS | XPath | strict locator.
19341947
19351948
Returns **void** automatically synchronized promise through #recorder
19361949
@@ -2098,13 +2111,17 @@ Selects an option in a drop-down select.
20982111
Field is searched by label | name | CSS | XPath.
20992112
Option is selected by visible text or by value.
21002113
2114+
The third parameter is a context (CSS or XPath locator) to narrow the search.
2115+
21012116
```js
21022117
I.selectOption('Choose Plan', 'Monthly'); // select by label
21032118
I.selectOption('subscription', 'Monthly'); // match option by text
21042119
I.selectOption('subscription', '0'); // or by value
21052120
I.selectOption('//form/select[@name=account]','Premium');
21062121
I.selectOption('form select[name=account]', 'Premium');
21072122
I.selectOption({css: 'form select[name=account]'}, 'Premium');
2123+
// within a context
2124+
I.selectOption('age', '21-60', '#section2');
21082125
```
21092126
21102127
Provide an array for the second argument to select multiple options.
@@ -2117,6 +2134,7 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
21172134
21182135
* `select` **([string][18] | [object][17])** field located by label|name|CSS|XPath|strict locator.
21192136
* `option` **([string][18] | [Array][29]<any>)** visible text or value of option.
2137+
* `context` **([string][18]? | [object][17])** (optional, `null` by default) element located by CSS | XPath | strict locator.
21202138
21212139
Returns **void** automatically synchronized promise through #recorder
21222140

0 commit comments

Comments
 (0)