Peter Nixey
Peter Nixey

Reputation: 16565

How to force selenium to have same default wait time as Capybara

I'm running some tests that depend on data reloading into the page. These run fine in Capybara which pauses on has_content and retries if it can't find it. However they're failing in Selenium which attacks the problem immediately and doesn't do any retries.

Scenario: submit a question to the panel from its homepage
  When I submit the question "what's the best grease to use on my trucks?"
  Then I should be on the "Ruderiders" panel homepage
  And I should see the question entitled "what's the best grease to use on my trucks?" at the top of the feed

How can I force Selenium to do the same wait and retry that Capybara does?

Upvotes: 2

Views: 2032

Answers (1)

socjopata
socjopata

Reputation: 5095

You should check your Capybara.default_wait_time setting and increase the default wait time if needed.

I am glad it worked for you :)

Upvotes: 1

Related Questions