检查 JavaScript 的功能测试

发布于 2024-12-29 14:59:31 字数 91 浏览 3 评论 0原文

我的要求是在 ruby​​ on Rails 中编写一个功能测试来检查 javascript 是否已加载。谁能给我一些提示或例子,以便我能够理解它是什么以及如何处理它?

my requirement is to write a functional test in ruby on rails to check whether javascript is loaded or not. can anyone give me some hint or example so that i can understand, what and how to do with it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜尕妞 2025-01-05 14:59:31

您还可以将 Cucumber 与水豚一起使用,在场景之前使用 @javascript 标记测试您的视图。

http://openmonkey.com/2010/04/09/ javascript-testing-with-cucumber-capybara/

You can also use Cucumber with capybara to test your views with @javascript tag before your scenarios.

http://openmonkey.com/2010/04/09/javascript-testing-with-cucumber-capybara/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文