开发者

How do I follow a link defined inside a jquery selector?

开发者 https://www.devze.com 2023-02-27 00:30 出处:网络
I have a cucumber test (using Capybara) that needs to follow a link in a js.erb view. The view looks like this:

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

精彩评论

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