开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜