Capybara/Cucumber and waiting for Javascripty stuff to happen

August 20, 2010 Mike Gehard

A little ditty that makes it really easy to wait for something Javascripty to happen…like a Javascript dialog to appear that gets populated from an AJAX call.

The has_css? method call will wait until the element shows up and if it doesn’t show up before the Capybara timeout expires then it will return false.

About the Author


JavaScript constructors, prototypes, and the `new` keyword
JavaScript constructors, prototypes, and the `new` keyword

Are you baffled by the new operator in JavaScript? Wonder what the difference between a function and a con...

Testing Resque with Cucumber
Testing Resque with Cucumber

For some reason the Universe keeps sending great Cucumber related stories to me via Twitter. Here is anoth...


Subscribe to our Newsletter

Thank you!
Error - something went wrong!