class Playwright::Page

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

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