class Playwright::Page

def expect_popup(predicate: nil, timeout: nil, &block)

Will throw an error if the page is closed before the popup event is fired.
[Popup] value into the `predicate` function and waits for `predicate(page)` to return a truthy value.
Performs action and waits for a popup `Page`. If predicate is provided, it passes
def expect_popup(predicate: nil, timeout: nil, &block)
  wrap_impl(@impl.expect_popup(predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
end