I need to wait for loading bar (div#loading) to disappear (become display: none) in a cucumber step. I’d expect the following to do the trick
find('#loading').should_not be_visible
But it doesn’t seem to be waiting. Any ideas how to achieve that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will want to use the
wait_untilto wait for your condition to be met.There might be a better wait to check for visibility, but last time I checked
page.has_no_cssdoes not work with things like:visible.(Update) Though
has_cssdoes not see selectors like:visible,Capybara::Node::Elementdoes have some methods to make the above a bit prettier.