Defines custom browser commands that are made available through the global WebdriverIO browser object.
Methods
(inner) clickFirstElement(selector) → {Promise}
Click on the first element of the list of elements matching the CSS selector
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | CSS selector to identify the elements |
- Since:
- 1.0.0
- Source:
Returns:
- Type
- Promise
(inner) clickLastElement(selector) → {Promise}
Click on the last element of the list of elements matching the CSS selector
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | CSS selector to identify the elements |
- Since:
- 1.0.0
- Source:
Returns:
- Type
- Promise
(inner) clickNthElement(selector, nth) → {Promise}
Click on the nth element of the list of elements matching the CSS selector
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | CSS selector to identify the elements |
nth |
number | Element to click on. First element is at rank 1. |
- Since:
- 1.0.0
- Source:
Returns:
- Type
- Promise
(inner) getNumberOfElements(selector) → {Promise}
Get the number of elements matching a specific CSS selector
Parameters:
Name | Type | Description |
---|---|---|
selector |
string | CSS selector to identify the elements |
- Since:
- 1.0.0
- Source:
Returns:
- Type
- Promise
(inner) waitForAllVisible(elements) → {Promise}
Similar to waitForVisible from webdriverio but on multiple elements
Parameters:
Name | Type | Description |
---|---|---|
elements |
Array.<string> | Array of elements that are CSS selectors |
- Since:
- 1.0.0
- Source:
Returns:
- Type
- Promise