waitForVisible
Wait for an element (selected by css selector) for the provided amount of
milliseconds to be (in)visible. If multiple elements get queryied by given
selector, it returns true (or false if reverse flag is set) if at least one
element is visible.
This function checks for visibility using window.getComputedStyle. An
element will be considered invisible if its visibility is ‘hidden’, its
display is ‘none’, its opacity is 0 or its x/y coordinates are not
within the viewport.
Usage
1
| client.waitForVisible(selector[,ms][,reverse]).then(callback);
|
Parameters
Param |
Type |
Details |
selector |
String |
element to wait for |
ms optional |
Number |
time in ms (default: 500) |
reverse optional |
Boolean |
if true it waits for the opposite (default: false) |
Uses