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
-
element
-
Element/condition to wait for
-
time
-
Time to wait. default to 10s
-
null-null
-
Custom message