Skip to content

Commit 974e241

Browse files
committed
DOC: Autogenerate and update documentation
1 parent 94a8856 commit 974e241

4 files changed

Lines changed: 462 additions & 415 deletions

File tree

docs/helpers/Appium.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,12 @@ I.click('//form/*[@type=submit]');
936936
I.click('Logout', '#nav');
937937
// using strict locator
938938
I.click({css: 'nav a.login'});
939+
// using ARIA role locator
940+
I.click({role: 'button', name: 'Submit'});
939941
```
940942

943+
> ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators][17].
944+
941945
#### Parameters
942946

943947
* `locator` **([string][5] | [object][11])** (optional, `'//body'` by default) clickable link or button located by text, or any element located by CSS|XPath|strict locator. (optional, default `'//body'`)
@@ -1034,10 +1038,14 @@ I.fillField('password', secret('123456'));
10341038
I.fillField('form#login input[name=username]', 'John');
10351039
// or by strict locator
10361040
I.fillField({css: 'form#login input[name=username]'}, 'John');
1041+
// by ARIA role locator
1042+
I.fillField({role: 'textbox', name: 'Email'}, 'hello@world.com');
10371043
// within a context
10381044
I.fillField('Name', 'John', '#section2');
10391045
```
10401046

1047+
> ℹ️ ARIA role locators (`{role, name}`) match fields by their accessible name and survive markup refactors. See [Locators][17].
1048+
10411049
#### Parameters
10421050

10431051
* `field` **([string][5] | [object][11])** located by label|name|CSS|XPath|strict locator.
@@ -1188,7 +1196,7 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
11881196
#### Parameters
11891197

11901198
* `locator` **([string][5] | [object][11])** located by CSS|XPath|strict locator.
1191-
* `scrollIntoViewOptions` **(ScrollIntoViewOptions | [boolean][7])** either alignToTop=true|false or scrollIntoViewOptions. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][17].
1199+
* `scrollIntoViewOptions` **(ScrollIntoViewOptions | [boolean][7])** either alignToTop=true|false or scrollIntoViewOptions. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][18].
11921200

11931201
Returns **void** automatically synchronized promise through #recorderSupported only for web testing
11941202

@@ -1218,8 +1226,12 @@ The second parameter is a context (CSS or XPath locator) to narrow the search.
12181226
```js
12191227
I.seeElement('#modal');
12201228
I.seeElement('#modal', '#container');
1229+
// using ARIA role locator
1230+
I.seeElement({role: 'dialog'});
12211231
```
12221232

1233+
> ℹ️ ARIA role locators (`{role, name}`) match elements the way assistive technology does and survive markup refactors. See [Locators][17].
1234+
12231235
#### Parameters
12241236

12251237
* `locator` **([string][5] | [object][11])** located by CSS|XPath|strict locator.
@@ -1402,4 +1414,6 @@ Returns **void** automatically synchronized promise through #recorder
14021414

14031415
[16]: http://webdriver.io/api/mobile/setImmediateValue.html
14041416

1405-
[17]: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
1417+
[17]: /locators#aria-locators
1418+
1419+
[18]: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

0 commit comments

Comments
 (0)