lib/spreewald/web_steps.rb in spreewald-0.3.6 vs lib/spreewald/web_steps.rb in spreewald-0.3.7

- old
+ new

@@ -438,10 +438,10 @@ # Click on some text that might not be a link When /^I click on "([^\"]+)"$/ do |text| matcher = ['*', { :text => text }] patiently do element = page.find(:css, *matcher) - while better_match = element.find(:css, *matcher) + while better_match = element.first(:css, *matcher) element = better_match end element.click end end