Using Capybara for AJAX integration tests

后端 未结 2 2053
既然无缘
既然无缘 2021-01-03 04:09

I am using Capybara for rails integration tests. When it comes to AJAX requests, I am getting the following error:

Capybara::TimeoutError: failed to resynchr         


        
相关标签:
2条回答
  • 2021-01-03 04:27

    I had this same issue once I upgraded my selenium/capybara gems. There is some AJAX synchronization logic that is causing this, so I just disabled it within my test hook.

    Before do
      page.driver.options[:resynchronize] = false
    end
    
    0 讨论(0)
  • 2021-01-03 04:34

    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 do bundle update.

    This will solve it.

    0 讨论(0)
提交回复
热议问题