Ruby/Watir:Firefox无头 [英] Ruby/Watir : firefox headless
本文介绍了Ruby/Watir:Firefox无头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据此: https://developer.mozilla.org/zh-CN /Firefox/Headless_mode firefox 57+,可以在无头模式下运行.
我试图与此配合使用:
omg3r = Watir::Browser.new :firefox, profile: 'omg3r', args: "-headless"
,我找不到如何在watir中正确向Firefox发送参数的示例. 请帮助
解决方案
如果您使用的是Watir 6.9,则可以尝试:
omg3r = Watir::Browser.new :firefox, profile: 'omg3r', headless: true
according to this: https://developer.mozilla.org/en-US/Firefox/Headless_mode firefox 57+, has the ability to run in headless mode.
i tried to use it with this:
omg3r = Watir::Browser.new :firefox, profile: 'omg3r', args: "-headless"
and i couldn't find an example to how to properly send arguments to firefox in watir. help please
解决方案
If you are using Watir 6.9 you can try:
omg3r = Watir::Browser.new :firefox, profile: 'omg3r', headless: true
这篇关于Ruby/Watir:Firefox无头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文