Image of click_link in a cucumber
1 answer
Assuming you use capybaracucumber to support your specs, something like the next step should do the trick.
When /^I follow image link "([^"]*)"$/ do |img_alt|
find(:xpath, "//img[@alt = '#{img_alt}']/parent::a").click()
end
In the spec you can just say
When I follow image link "Running"
The general idea is that this requires some kind of custom step.
+9
Please ...">