class Playwright::WebSocket

def wait_for_event(event, predicate: nil, timeout: nil, &block)

Will throw an error if the socket is closed before the `event` is fired.
event's value into the `predicate` function and waits for `predicate(event)` to return a truthy value.
Waits for given `event` to fire. If predicate is provided, it passes

**NOTE**: In most cases, you should use [`method: WebSocket.waitForEvent`].
def wait_for_event(event, predicate: nil, timeout: nil, &block)
  wrap_impl(@impl.wait_for_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
end