Class: Playwright::WebSocket
- Inherits:
-
PlaywrightApi
- Object
- PlaywrightApi
- Playwright::WebSocket
- Defined in:
- lib/playwright_api/web_socket.rb
Overview
The ‘WebSocket` class represents websocket connections in the page.
Instance Method Summary collapse
-
#closed? ⇒ Boolean
Indicates that the web socket has been closed.
-
#url ⇒ Object
Contains the URL of the WebSocket.
-
#wait_for_event(event, optionsOrPredicate: nil) ⇒ Object
Returns the event data value.
Methods inherited from PlaywrightApi
Instance Method Details
#closed? ⇒ Boolean
Indicates that the web socket has been closed.
6 7 8 |
# File 'lib/playwright_api/web_socket.rb', line 6 def closed? raise NotImplementedError.new('closed? is not implemented yet.') end |
#url ⇒ Object
Contains the URL of the WebSocket.
11 12 13 |
# File 'lib/playwright_api/web_socket.rb', line 11 def url raise NotImplementedError.new('url is not implemented yet.') end |
#wait_for_event(event, optionsOrPredicate: nil) ⇒ Object
Returns the event data value.
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.
19 20 21 |
# File 'lib/playwright_api/web_socket.rb', line 19 def wait_for_event(event, optionsOrPredicate: nil) raise NotImplementedError.new('wait_for_event is not implemented yet.') end |