I'm trying to use the Selenium Webdriver gem to write a test but am getting the following error. "test.rb:4:in `': uninitialized constant Selenium (NameError)"
I can't seem to figure out why its giving me this error. I have pasted the code for the test below.
"require rubygems"
"require selenium-webdriver"
driver = Selenium::WebDriver.for :chrome
that is where it fails. The rest of the test is pretty page-specific js executions.
Your requires do nothing, you just wrote unused String literals, change it to:
require "rubygems"
require "selenium-webdriver"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With