Sporadically succeeding cucumber tests
===

I have a cucumber step that involves the following:

`When /^I select from the Open table project with details "([^"]*)"$/ do |details|`   

`find('.details', :text => details).click`

`end`

It fails with the following error message `Unable to find css ".details" (Capybara::ElementNotFound)`

This step fails about 90% of the time I run it, but occasionally it works. I inspect the page source, and the page does indeed have a css class .details with text that corresponds to details.

Is this some kind of timing issue or issue with cucumber? Or is it more likely that, now that Cucumber has driven me bat-poop insane, I'm not seeing things correctly?