waitForFunction(functionOrPredicate: "() => window.myAppInitialized === true")
Returns true if the function returns truthy within the timeout.
Definition
Arguments
functionOrPredicate
String!
A string containing the JavaScript function or predicate to evaluate.
It should return a truthy value when the condition is met.
Example: "() => document.querySelector('#dynamicElement') !== null"
arg
JSON
An optional JSON serializable argument to pass to the function.
options
WaitForFunctionOptions
Options for waiting, such as polling interval and timeout.
Returns
Boolean! TheBoolean
scalar type represents true
or false
.