How do I follow a link defined inside a jquery selector?
I have a cucumber test (using Capybara) that needs to follow a link in a js.erb view. The view looks like this:
$('#form-or-login').html("<%= escape_javascript( link_to(image_tag("xxx", :border=>0), "yyy" )) %>");
How do I reach the link_to tag 开发者_StackOverflowfrom my cucumber scenario?
And I follow [what goes here?]
Thanks!
I would recommend having some non-visible text in the anchor as well. That way you could click it with capybara. Otherwise you will need to write a custom cucumber step for it.
精彩评论