使用 watir 控制多个 firefox 实例
我通过 FireWatir 在 Windows 环境中通过 FireFox 3.6 使用 watir。我可以毫无问题地成功运行单个 watir 测试。我需要能够
:从单个测试脚本创建和管理多个浏览器实例或选项卡
b
.从不同的 ruby 实例同时运行两个测试脚本
目前,尝试 a 和 b 都会导致两个 Browser.new 命令返回相同的浏览器实例,因此脚本会依次执行。
这两种情况有可能吗?我看过 2008/2009 年关于多浏览器分支的一些帖子,这段代码最终是否进入了通用版本?
谢谢,
杰夫
I'm using watir in a Windows environment with FireFox 3.6 via FireWatir. I can successfully run a single watir test without issue. I need to be able to either:
a. Create and manage multiple browser instances or tabs from a single test script
or
b. Run two test scripts simultaneously from separate instances of ruby
Currently attempts at both a and b result in both Browser.new commands returning the same browser instance, thus the scripts step all over one-another.
Are either of these scenarios possible? I've seen some posts from 2008/2009 about a multiple browser branch, did this code eventually make it into the general release?
Thanks,
Jeff
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我刚刚尝试过 watir-webdriver gem (安装说明),它可以工作:
I have just tried it with watir-webdriver gem (installation instructions), and it works:
Vapir-firefox 是 Firewatir 的一个经过大幅改进的分支,它解决了处理多个窗口的问题(以及许多其他改进)。
http://vapir.org/
Vapir-firefox is a much-improved fork of Firewatir that resolves its issues with handling multiple windows (among many other improvements).
http://vapir.org/