No results for

Powered byAlgolia

waitForEvent(event[, optionsOrPredicate])

warning

This method is a Work In Progress. It requires async functionality and returning a Promise to be useful in scripts. See issue #447 for details.

Consider using sync methods Page.waitForNavigation() and Page.waitForSelector() instead.

Waits for the event to fire and passes its value into the predicate function. Returns the event data value when the predicate returns true.

ParameterTypeDefaultDescription
event
stringnullName of event to wait for. NOTE: Currently this argument is disregarded, and waitForEvent will always wait for 'close' or 'page' events.
optionsOrPredicate
function|objectnullOptional. If it's a function, the 'page' event data will be passed to it and it must return true to continue.

Returns

TypeDescription
objectPage object