Class: Selenium::WebDriver::BiDi::Session
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Inherits: | Object |
Defined in: | rb/lib/selenium/webdriver/bidi/session.rb |
Class Method Summary
- .new(bidi) ⇒ Session constructor
Instance Method Summary
Constructor Details
.new(bidi) ⇒ Session
# File 'rb/lib/selenium/webdriver/bidi/session.rb', line 26
def initialize(bidi) @bidi = bidi end
Instance Method Details
#status
[ GitHub ]#subscribe(events, browsing_contexts = nil)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi/session.rb', line 35
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)
[ GitHub ]# File 'rb/lib/selenium/webdriver/bidi/session.rb', line 42
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