evaluate script jquery+selenium recursion error #76

Closed
alexpooley opened this Issue May 17, 2010 · 2 comments

Projects

None yet

2 participants

@alexpooley

Our page uses jQuery events. Using capybara+selenium we're triggering the events using evaluate_script. The web driver makes some complaint about recursion and then returns an error.

Our call is something like this: page.evaluate_script("$(#some input).change()")

Our fix is to do this: page.evaluate_script("$(#some input).change() && false")

There's something about the implicit "return" in the evaluate_script method in capybara that is causing the script to run over and over again (I think).

I had a quick look but couldn't create a proper test. I wanted to document the issue here as I've seen others with similar problems.

@jnicklas
Collaborator

There already was an issue for this: http://github.com/jnicklas/capybara/issues/closed#issue/71

I closed it, because the problem lies in webdriver and not in Capybara. I'm going to leave this issue open for now, just as a flag to people that this is a problem.

@jnicklas
Collaborator

I added a separate execute_script method which is to be used for this sort of thing, working around the issue.

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