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['ready'], status['message']) end
def subscribe(events, browsing_contexts = nil)
def subscribe(events, browsing_contexts = nil) events_list = Array(events) browsing_contexts_list = browsing_contexts.nil? ? nil : Array(browsing_contexts) @bidi.send_cmd('session.subscribe', events: events_list, contexts: browsing_contexts_list) end
def unsubscribe(events, browsing_contexts = nil)
def unsubscribe(events, browsing_contexts = nil) events_list = Array(events) browsing_contexts_list = browsing_contexts.nil? ? nil : Array(browsing_contexts) @bidi.send_cmd('session.unsubscribe', events: events_list, contexts: browsing_contexts_list) end