module Selenium::WebDriver::Firefox::Features
def command_list
def command_list FIREFOX_COMMANDS.merge(self.class::COMMANDS) end
def commands(command)
def commands(command) command_list[command] end
def context
def context execute :get_context end
def context=(context)
def context=(context) execute :set_context, {}, {context: context} end
def full_screenshot
def full_screenshot execute :full_page_screenshot end
def install_addon(path, temporary)
def install_addon(path, temporary) addon = if File.directory?(path) Zipper.zip(path) else File.open(path, 'rb') { |crx_file| Base64.strict_encode64 crx_file.read } end payload = {addon: addon} payload[:temporary] = temporary unless temporary.nil? execute :install_addon, {}, payload end
def uninstall_addon(id)
def uninstall_addon(id) execute :uninstall_addon, {}, {id: id} end