Using Capybara for AJAX Integration Tests

I use Capybara to test rail integration. When it comes to AJAX requests, I get the following error:

Capybara::TimeoutError: failed to resynchronize, ajax request timed out 

Any idea what is wrong and how can this be fixed?

+5
source share
2 answers

I had the same issue as soon as I updated my selenium / capybara gemstones. There is some AJAX sync logic that causes this, so I just disabled it in my test cache.

 Before do page.driver.options[:resynchronize] = false end 
+8
source

If you are on rail 3

change this in your gem file.

gem 'capybara' ,: git => 'git: //github.com/jnicklas/capybara.git' ,: branch => 'async_is_my_bitch'

then upgrade the package.

This will solve the problem.

+2
source

Source: https://habr.com/ru/post/892886/


All Articles