Class: Selenium::WebDriver::BiDi
Class Method Summary
- .new(url:) ⇒ BiDi constructor
Instance Method Summary
Constructor Details
.new(url:) ⇒ BiDi
# File 'rb/lib/selenium/webdriver/bidi.rb', line 30
def initialize(url:) @ws = WebSocketConnection.new(url: url) end
Instance Method Details
#add_callback(event)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi.rb', line 42
def add_callback(event, &) @ws.add_callback(event, &) end
#callbacks
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi.rb', line 38
def callbacks @ws.callbacks end
#close
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi.rb', line 34
def close @ws.close end
#error_message(message)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi.rb', line 62
def ( ) "#{ ['error']}: #{ ['message']}\n#{ ['stacktrace']}" end
#remove_callback(event, id)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi.rb', line 46
def remove_callback(event, id) @ws.remove_callback(event, id) end
#send_cmd(method, **params)
# File 'rb/lib/selenium/webdriver/bidi.rb', line 54
def send_cmd(method, **params) data = {method: method, params: params.compact} = @ws.send_cmd(**data) raise Error::WebDriverError, ( ) if ['error'] ['result'] end