开发者

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

开发者 https://www.devze.com 2023-03-28 22:37 出处:网络
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

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 "Rud开发者_如何转开发eriders" 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
  • works in Capybara
  • fails in Selenium (@javascript

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


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

I am glad it worked for you :)

0

精彩评论

暂无评论...
验证码 换一张
取 消