Class: Selenium::DevTools::V128::Extensions
- Inherits:
-
Object
- Object
- Selenium::DevTools::V128::Extensions
- Defined in:
- lib/selenium/devtools/v128/extensions.rb
Instance Method Summary collapse
-
#initialize(devtools) ⇒ Extensions
constructor
A new instance of Extensions.
- #load_unpacked(path:) ⇒ Object
- #on(event, &block) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ Extensions
Returns a new instance of Extensions.
26 27 28 |
# File 'lib/selenium/devtools/v128/extensions.rb', line 26 def initialize(devtools) @devtools = devtools end |
Instance Method Details
#load_unpacked(path:) ⇒ Object
35 36 37 38 |
# File 'lib/selenium/devtools/v128/extensions.rb', line 35 def load_unpacked(path:) @devtools.send_cmd('Extensions.loadUnpacked', path: path) end |
#on(event, &block) ⇒ Object
30 31 32 33 |
# File 'lib/selenium/devtools/v128/extensions.rb', line 30 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Extensions.#{event}"] << block end |