Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined selenium selenium

Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined


This is a known issue with the current release of selenium.

As @janders223 points out in a comment on another question, the temporary workaround for a Ruby project is to use the dev version of the selenium-webdriver gem.

Modify your Gemfile to specify the latest dev version (as of this writing):

gem 'selenium-webdriver', '>=2.45.0.dev3'

Then run bundle install.


So, this is incredibly basic, but I found that when I had installed Firefox 34 via the dmg listed here, because I had naïvely just dragged and dropped the Firefox icon into the Applications folder clicking "Yes, I would like to overwrite the extant application" I hadn't ensured all of the newer files of Firefox 35 weren't available for Selenium to use, which Selenium availed itself of without me knowing which version it was choosing.

I simply uninstalled Firefox completely from my the mac by dragging it into the Trash, & reinstalled the Firefox 34 dmg.

N.B. Also if you run into this issue, when you download Firefox 34, you have to go to Firefox >Preferences>Advanced , click the Update tab, and choose "Check for updates, but let me choose whether to install them" or "Never check for updates" to prevent Firefox from automatically updating to Firefox 35 and therefore messing with your Selenium test suite the next time you run them again.