Watir 可以与 Firefox 扩展交互吗?
我知道,通过 watir-WebDriver,当我创建新的浏览器实例时,我可以利用 RubyBindings 让浏览器加载特定的配置文件或 Firefox 附加组件。但是,我可以使用 Watir 来实际使用我打开的附加组件吗?
我问这个问题的原因是我正在尝试实现一个网络抓取工具来导航到网站并记录 HTTP 交互。但是,由于 Tamper Data 已经完成了我需要的 HTTP 请求/响应日志记录,因此我宁愿使用它的功能,而不必自己重做。
如果这是不可能的,我想知道是否有人知道一个单元测试器可以让我:
- 打开 Firefox 浏览器并打开它。加载 Tamper Data
- 导航到指定页面
- 单击 Tamper Data UI 上的按钮
I know that with watir-WebDriver, I can make use of RubyBindings to have the browser load specific profiles or Firefox add-ons when I create a new browser instance. However, can I use Watir to actually use the add-on(s) I open?
The reason I ask is that I am trying to implement a web scraper to navigate to websites and record HTTP interactions. However, since Tamper Data already does the HTTP request/response logging I require, I'd rather use its functionality instead of having to redo it myself.
If this is not possible, I'm wondering if anyone knows a unit tester that will allow me to:
- Open a Firefox browser & load Tamper Data
- Navigate to specified pages
- Click a button on Tamper Data's UI
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,您无法使用裸 watir/webdriver 与扩展进行交互,需要找到解决方法...尝试类似 rautomation - https://github.com/jarmo/RAutomation 或 autoit - http://www.autoitscript.com/site/
You can't interact with extensions using bare watir/webdriver as far as i know, need to find a workaround ... Try something like rautomation - https://github.com/jarmo/RAutomation or autoit - http://www.autoitscript.com/site/
这适用于我启动 firebug:
Win 7 & XP:
如果您是计算机的管理员,则会显示以下内容...否则搜索并提供路径:
This works for me to launch firebug:
Win 7 & XP:
If you are admin on your machine it will be the following... otherwise search and provide path: