How can i click a link using capybara.I need to click the graduation link
<a href="/arts?Occasion=Graduation&top_menu_item_title=+-+Graduation">Graduation</a>
I used following code
.but showing error message undefined method click
page.find(:link,"Graduation").click
also used Xpath
page.find(:xpath, "//a[@href='/arts?Occasion=Graduation']").click
it is also not working
But my problem is my page contains multiple links of graduation.
so using page.all(:link,"Graduation")
returns Ambiguous match, found 2 elements matching link "Graduation"