New answers tagged

0

Use expect(page.has_css?('#div.error', wait: 3)).to be true If the expression is true (i.e. error exists) at the outset, it will return immediately, i.e. will pass. Otherwise, it will use a polling wait for up to 3 seconds to see if the condition changes. The difference between using fixed ('sleeps' or 'implicit wait') is they they will always wait and ...


0

This is the problem with negative assertions since Capybara has no way to know how long any actions are going to take on the page, so really can't know that even though the assertion is passing now you really want it to wait longer to make sure it keeps passing. What you really need is a positive assertion before the negative assertion to assure the page is ...


Top 50 recent answers are included