untilJsReturnsAValue
Waits until given js snippet returns a value. If running the snippet throws errors they will be suppressed until a value is received.
untilJsReturnsAValue(snippet)Uses Script timeout.
Parameters#
snippet: A js snippet asstring
Returns#
- return value from the
jssnippet
Example#
# get an attribute of an element. If element is not found immediately wait until it renders on pageuntilJsReturnsAValue("document.getElementsByName('product-phone')[0].getAttribute('data-price')")