class Selenium::WebDriver::BiDi
def callbacks
def callbacks @ws.callbacks end
def close
def close @ws.close end
def error_message(message)
def error_message(message) "#{message['error']}: #{message['message']}\n#{message['stacktrace']}" end
def initialize(url:)
def initialize(url:) @ws = WebSocketConnection.new(url: url) end
def send_cmd(method, **params)
def send_cmd(method, **params) data = {method: method, params: params.compact} message = @ws.send_cmd(**data) raise Error::WebDriverError, error_message(message) if message['error'] message['result'] end
def session
def session @session ||= Session.new(self) end