Capybara::TimeoutError – Wrestling With BDD

- - posted in Uncategorized

Cucumber and BDD are great – they allow you to hack away with (semi)confidence, and tests will make sure you play nice with other people’s code.

It fails when you’re wrestling more with your testing tools than your own code. (Why does Firefox need to update itself every two weeks!?!?!?!) Here’s one example of an error that made no sense to me when I saw it:

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

Thankfully there’s an easy answer thanks to Stackoverflow.

Just need to place the following in your step definitions file:

Before do
page.driver.options[:resynchronize] = false