测试 javascript 小部件是否存在
我如何用水豚轻松测试黄瓜,页面上是否存在小部件?
How I can easy test in cucumber with capybara, exist widget on page or not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我如何用水豚轻松测试黄瓜,页面上是否存在小部件?
How I can easy test in cucumber with capybara, exist widget on page or not?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
如果您要使用本地脚本 src 创建小部件,则只需使用
标记 Cucumber 功能
@javascript
它会为你评估 javascript。
如果您从其他站点加载小部件,则此方法将不起作用(并且您需要查看 Selenium 或类似的方法)
If you are creating the widget with the script src being local, then just mark the cucumber feature with
@javascript
And it will evaluate javascript for you.
If you're loading a widget from another site, then this method won't work (and you'll need to look at Selenium or similar)