API Reference - mohithg/wdio-helpers GitHub Wiki
- load(url)
-
loads the url in the browser.
- wait(selector)
-
Accepts selector to wait for the element to appear in the DOM and scroll the page to that element in the screen.
- click(selector, [index])
-
clicks the selector specified and if there are multiple elememts with the same selector it will choose based on the index. Note that it waits until selector appears in the DOM.
- setValue(selector, [index], [value])
-
Set Value in any selector
- waitForElementToGo(selector, [index])
-
Waits until element is not visible in DOM. Selector will choose based on the index.
-
findElementFromGroupWithText()(groupSelector, textToSearch) ⇒
element
-
Finds and returns the element that matches the text from the group of selectors
-
logConsoleOutput(type) ⇒
array
-
Returns the console errors from browser
loads the url in the browser.
Kind: global function
Param | Type | Description |
---|---|---|
url | string |
The url to navigate to. |
Accepts selector to wait for the element to appear in the DOM and scroll the page to that element in the screen.
Kind: global function
Param | Type | Description |
---|---|---|
selector | string |
The Selector element. |
clicks the selector specified and if there are multiple elememts with the same selector it will choose based on the index. Note that it waits until selector appears in the DOM.
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
selector | string |
The Selector element. | |
[index] | number |
0 |
index number |
Set Value in any selector
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
selector | string |
The Selector element. | |
[index] | number |
0 |
index number |
[value] | string |
"''" |
Value to be set in the selector |
Waits until element is not visible in DOM. Selector will choose based on the index.
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
selector | string |
The Selector element. | |
[index] | number |
0 |
index number |
Finds and returns the element that matches the text from the group of selectors
Kind: global function
Returns: element
- element - The element which matches the textToSearch from group of groupSelector or returns null if nothing is found
Param | Type | Description |
---|---|---|
groupSelector | string |
The groupSelector element. |
textToSearch | string |
Enter the text to search in elements |
Returns the console errors from browser
Kind: global function
Returns: array
- array - Returns the console errors from browser
Param | Type | Description |
---|---|---|
type | string |
Type can be INFO, WARNING, SEVERE. If no type is provided, all messages are returned. |