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



29
30
31
# File 'lib/selenium/webdriver/firefox/marionette/bridge.rb', line 29

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

#install_addon(path, temporary) ⇒ Object



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

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

#uninstall_addon(id) ⇒ Object



39
40
41
# File 'lib/selenium/webdriver/firefox/marionette/bridge.rb', line 39

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