class Selenium::WebDriver::BiDi::Session
def initialize(bidi)
def initialize(bidi) @bidi = bidi end
def status
def status status = @bidi.send_cmd('session.status') Status.new(**status) end
def subscribe(events, browsing_contexts = nil)
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
def unsubscribe(events, browsing_contexts = nil)
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