jscript error, jQuery 1.5.1 #17

Closed
fwoeck opened this Issue Apr 15, 2011 · 3 comments

Comments

Projects
None yet
3 participants

fwoeck commented Apr 15, 2011

Hi, thank you for this driver, I hope I can replace our selenium based steps!

With a jQuery 1.5.1 based script I get this error:

........undefined:1 ReferenceError: Can't find variable: $
F--.....

(::) failed steps (::)

Javascript failed to execute (Capybara::Driver::Webkit::WebkitError)
./features/step_definitions/landing_steps.rb:40:in /I leave the "(.+)" input field/' features/landing_page.feature:19:inAnd I leave the email input field'

The step definition is as follows

page.execute_script("$('input##{name}').trigger('DOMActivate').change().focusout();")

The script itself should be OK and runs with selenium/akehalos.
I see that this is not a lot if information - I'd be happy if you could ask for more specific things or point me to a direction.
--Frank

fwoeck commented Apr 15, 2011

It was one of these nagging timing problems, I have to wait until jQuery is loaded!
Thank you anyways,
--Frank

fwoeck closed this Apr 15, 2011

joxxoxo commented Aug 29, 2012

Recently I've faced with this error, how do you check that jQuery is loaded?

Owner

jferris commented Aug 29, 2012

With most timing issues, it's easiest to let capybara handling waiting and syncing for you and look for some text or markup on the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment