Module: Selenium::WebDriver::Firefox::Marionette::Bridge

Defined in:
lib/selenium/webdriver/firefox/marionette/bridge.rb

Constant Summary collapse

COMMANDS =
{
  install_addon: [:post, 'session/:session_id/moz/addon/install'.freeze],
  uninstall_addon: [:post, 'session/:session_id/moz/addon/uninstall'.freeze]
}.freeze

Instance Method Summary collapse

Instance Method Details

#commands(command) ⇒ Object


31
32
33
# File 'lib/selenium/webdriver/firefox/marionette/bridge.rb', line 31

def commands(command)
  COMMANDS[command] || super
end

#install_addon(path, temporary) ⇒ Object


35
36
37
38
39
# File 'lib/selenium/webdriver/firefox/marionette/bridge.rb', line 35

def install_addon(path, temporary)
  payload = {path: path}
  payload.merge!(temporary: temporary) unless temporary.nil?
  execute :install_addon, {}, payload
end

#uninstall_addon(id) ⇒ Object


41
42
43
# File 'lib/selenium/webdriver/firefox/marionette/bridge.rb', line 41

def uninstall_addon(id)
  execute :uninstall_addon, {}, {id: id}
end