Class: Selenium::WebDriver::BiDi::Transport Private
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | rb/lib/selenium/webdriver/bidi/transport.rb |
Overview
The seam between the generated Protocol layer and the websocket: serializes a
command's params, sends it, and parses the reply into its declared type.
Class Method Summary
- .new(connection) ⇒ Transport constructor Internal use only
Instance Attribute Summary
-
#connection
readonly
Internal use only
The websocket the transport sends over.
Instance Method Summary
- #execute(cmd:, params: nil, result: nil) Internal use only
- #error_for(reply) private Internal use only
- #serialize(params) private Internal use only
Constructor Details
.new(connection) ⇒ Transport
# File 'rb/lib/selenium/webdriver/bidi/transport.rb', line 33
def initialize(connection) @connection = connection end
Instance Attribute Details
#connection (readonly)
The websocket the transport sends over. Exposed so a domain can build a sibling
domain (e.g. a vendor variant) over the same connection without Transport ever
becoming a public constructor argument.
# File 'rb/lib/selenium/webdriver/bidi/transport.rb', line 31
attr_reader :connection
Instance Method Details
#error_for(reply) (private)
[ GitHub ]#execute(cmd:, params: nil, result: nil)
[ GitHub ]#serialize(params) (private)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi/transport.rb', line 47
def serialize(params) params&.as_json || {} end