Method: Selenium::WebDriver::WebSocketConnection#send_cmd
- Defined in:
- lib/selenium/webdriver/common/websocket_connection.rb
#send_cmd(**payload) ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/selenium/webdriver/common/websocket_connection.rb', line 67 def send_cmd(**payload) id = next_id data = payload.merge(id: id) WebDriver.logger.debug "WebSocket -> #{data}"[...MAX_LOG_MESSAGE_SIZE], id: :bidi data = JSON.generate(data) out_frame = WebSocket::Frame::Outgoing::Client.new(version: ws.version, data: data, type: 'text') socket.write(out_frame.to_s) wait.until { .delete(id) } end |