class Playwright::Page
def expect_event(event, predicate: nil, timeout: nil, &block)
frame = event_info.value
page.get_by_role("button")
with page.expect_event("framenavigated") as event_info:
```python sync
**Usage**
value. Will throw an error if the page is closed before the event is fired. Returns the event data value.
Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy
def expect_event(event, predicate: nil, timeout: nil, &block) wrap_impl(@impl.expect_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block))) end