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.
-
#expect_event(event, optionsOrPredicate: nil) ⇒ Object
Waits for event to fire and passes its value into the predicate function.
-
#url ⇒ Object
Contains the URL of the WebSocket.
Methods inherited from PlaywrightApi
#==, from_channel_owner, #initialize
Constructor Details
This class inherits a constructor from Playwright::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 |
#expect_event(event, optionsOrPredicate: nil) ⇒ 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.
17 18 19 |
# File 'lib/playwright_api/web_socket.rb', line 17 def expect_event(event, optionsOrPredicate: nil) raise NotImplementedError.new('expect_event 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 |