class Selenium::WebDriver::BiDi::Session
Implements the Session Module of the WebDriver-BiDi specification
@api private
Constants
- Status
Public Class Methods
new(bidi)
click to toggle source
# File lib/selenium/webdriver/bidi/session.rb, line 30 def initialize(bidi) @bidi = bidi end
Public Instance Methods
status()
click to toggle source
# File lib/selenium/webdriver/bidi/session.rb, line 34 def status status = @bidi.send_cmd('session.status') Status.new(**status) end
subscribe(events, browsing_contexts = nil)
click to toggle source
# File lib/selenium/webdriver/bidi/session.rb, line 39 def subscribe(events, browsing_contexts = nil) opts = {events: Array(events)} opts[:browsing_contexts] = Array(browsing_contexts) if browsing_contexts @bidi.send_cmd('session.subscribe', **opts) end
unsubscribe(events, browsing_contexts = nil)
click to toggle source
# File lib/selenium/webdriver/bidi/session.rb, line 46 def unsubscribe(events, browsing_contexts = nil) opts = {events: Array(events)} opts[:browsing_contexts] = Array(browsing_contexts) if browsing_contexts @bidi.send_cmd('session.unsubscribe', **opts) end