class Playwright::WebSocket

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

value. Will throw an error if the webSocket 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