Skip to content

waitFor()

This function is used to wait for number of milliseconds given or a given element or a given condition.

Examples

waitFor(5000)
waitFor("1 item in cart")
waitFor("Order Created", 2000)
waitFor(async () => !(await $("loading-text").exists()))

Parameters

Name Type Description
element string Element/condition to wait for
time number | time Time to wait. default to 10s
options unknown Default: {}.
null-null options.message Custom message

Returns

Type Description
promise