如何跟踪 jquery 选择器中定义的链接?
我有一个黄瓜测试(使用 Capybara),需要点击 js.erb 视图中的链接。 该视图如下所示:
$('#form-or-login').html("<%= escape_javascript( link_to(image_tag("xxx", :border=>0), "yyy" )) %>");
How do Ireach the link_to tag from my cucumber scene?
And I follow [what goes here?]
谢谢!
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 from my cucumber scenario?
And I follow [what goes here?]
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议在锚点中也包含一些不可见的文本。这样你就可以用水豚点击它。否则,您将需要为其编写自定义黄瓜步骤。
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.