Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Ch 8. Selenium Error #49

Open
dxypher opened this issue Feb 3, 2015 · 1 comment
Open

Ch 8. Selenium Error #49

dxypher opened this issue Feb 3, 2015 · 1 comment

Comments

@dxypher
Copy link

dxypher commented Feb 3, 2015

I was getting the following error after adding js: true to features/user_spec.rb

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

I was running Firefox 35. The solution was to uninstall Firefox 35 and install Firefox 34 instead.
After that the specs were passing again. I'm not sure why it doesn't work with 35.

I found the solution on StackOverflow, which also suggests disabling automatic updates of Firefox, otherwise it will update to 35 and the spec may fail again.

http://stackoverflow.com/questions/28159499/seleniumwebdrivererrorjavascripterror-arguments0-is-undefined

@ruralocity
Copy link
Member

Yes, that's a drawback of using Selenium. The Selenium team is usually pretty good about releasing updates within a few days of new Firefox releases.

I like to use it to show newcomers what's happening in JS-dependent tests, but personally use Poltergeist and PhantomJS for development. I wrote a blog post about how to switch last week: http://everydayrails.com/2015/01/27/rspec-switch-selenium-poltergeist.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants