Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uninitialized constant Selenium::WebDriver::Chrome::Options (NameError)

Needed to execute the below set of code. Please refer my code:

Capybara.register_driver :logging_selenium_chrome do |app|
  caps = Selenium::WebDriver::Remote::Capabilities.chrome(loggingPrefs:
  {browser: 'ALL'})
  browser_options = ::Selenium::WebDriver::Chrome::Options.new()
  Capybara::Selenium::Driver.new(app, browser: :chrome, options: 
  browser_options, desired_capabilities: caps)
end

but keeps on getting

uninitialized constant Selenium::WebDriver::Chrome::Options (NameError)

Anyone having any idea what might be causing this!!!

like image 874
Vivek Khurana Avatar asked Sep 19 '17 12:09

Vivek Khurana


1 Answers

::Selenium::WebDriver::Chrome::Options was added in selenium-webdriver 3.4.1 - Upgrade to the latest selenium-webdriver gem (3.5.2 currently)

like image 64
Thomas Walpole Avatar answered Nov 17 '22 15:11

Thomas Walpole