class Selenium::WebDriver::IE::Options

Constants

BROWSER
CAPABILITIES
KEY
SCROLL_BOTTOM
SCROLL_TOP

Attributes

args[R]

Public Class Methods

new(**opts) click to toggle source

Create a new Options instance

@example

options = Selenium::WebDriver::IE::Options.new(args: ['--host=127.0.0.1'])
driver = Selenium::WebDriver.for(:ie, capabilities: options)

@example

options = Selenium::WebDriver::IE::Options.new
options.element_scroll_behavior = Selenium::WebDriver::IE::Options::SCROLL_BOTTOM
driver = Selenium::WebDriver.for(:ie, capabilities: options)

@param [Hash] opts the pre-defined options @option opts [Array<String>] args @option opts [Integer] browser_attach_timeout @option opts [Integer] element_scroll_behavior Either SCROLL_TOP or SCROLL_BOTTOM @option opts [Boolean] full_page_screenshot @option opts [Boolean] ensure_clean_session @option opts [Integer] file_upload_dialog_timeout @option opts [Boolean] force_create_process_api @option opts [Boolean] force_shell_windows_api @option opts [Boolean] ignore_protected_mode_settings @option opts [Boolean] ignore_zoom_level @option opts [String] initial_browser_url @option opts [Boolean] native_events @option opts [Boolean] persistent_hover @option opts [Boolean] require_window_focus @option opts [Boolean] use_per_process_proxy @option opts [Boolean] validate_cookie_document_type

Calls superclass method Selenium::WebDriver::Options::new
# File lib/selenium/webdriver/ie/options.rb, line 81
def initialize(**opts)
  @args = (opts.delete(:args) || []).to_set
  super(**opts)

  @options[:native_events] = true if @options[:native_events].nil?
end

Public Instance Methods

add_argument(arg) click to toggle source

Add a command-line argument to use when starting Internet Explorer.

@param [String] arg The command-line argument to add

# File lib/selenium/webdriver/ie/options.rb, line 94
def add_argument(arg)
  @args << arg
end

Private Instance Methods

process_browser_options(browser_options) click to toggle source
# File lib/selenium/webdriver/ie/options.rb, line 100
def process_browser_options(browser_options)
  options = browser_options[KEY]
  options['ie.browserCommandLineSwitches'] = @args.to_a.join(' ') if @args.any?
end