Method: Playwright::WebSocket#expect_event
- Defined in:
- lib/playwright_api/web_socket.rb
#expect_event(event, predicate: nil, timeout: nil, &block) ⇒ Object
Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy value. Will throw an error if the webSocket is closed before the event is fired. Returns the event data value.
23 24 25 |
# File 'lib/playwright_api/web_socket.rb', line 23 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 |