Method: Selenium::WebDriver::Firefox::Options#add_argument

Defined in:
lib/selenium/webdriver/firefox/options.rb

#add_argument(arg) ⇒ Object

Add a command-line argument to use when starting Firefox.

Examples:

Start geckodriver on a specific host

options = Selenium::WebDriver::Firefox::Options.new
options.add_argument('--host=127.0.0.1')

Parameters:

  • arg (String)

    The command-line argument to add



86
87
88
# File 'lib/selenium/webdriver/firefox/options.rb', line 86

def add_argument(arg)
  @options[:args] << arg
end