作为第一次运行,防止watir-webdriver运行chrome [英] prevent watir-webdriver running chrome as a first run
问题描述
每次我使用watir-webdriver初始化一个chrome浏览器实例时,它都会以首次运行的方式启动,并弹出EULA弹出窗口并打开一个额外的入门选项卡。
我试图用
$来初始化浏览器b $ b
Selenium :: WebDriver.for:chrome,:switches => %w [ - no-first-run]
但结果相同。
我很惊讶无法在网上发现任何其他问题,所以假设我做了一些奇怪的事情!
我将chromedriver.exe放入 任何想法? 我找到了解决方案。在 打开此文件并设置: 解决了这两个问题。 希望这可以帮助别人! Everytime I use watir-webdriver to initialise a chrome browser instance, it launches as a first-run with an EULA pop-up and an additional getting-started tab open. Both of these side-effects are preventing me from automating tests for chrome. I have tried initialising a browser using just but have the same result. I am surprised to be unable find any other questions online about this, so assume I have done something weird! I have placed chromedriver.exe in Any ideas? I have found a solution for this. In Opening this file and setting: fixed both issues for me. Hopefully this helps someone! 这篇关于作为第一次运行,防止watir-webdriver运行chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! C:\程序文件(x86)\Google\Chrome\Application $ c
C:\程序文件(x86)\Google\Chrome\Application
中有一个名为master_preferences的文件。
require_eula
至 false
$ b $ p $ show $ welcome_page to false
Selenium::WebDriver.for :chrome, :switches => %w[--no-first-run]
C:\Program Files (x86)\Google\Chrome\Application
which is on my PATH variable.C:\Program Files (x86)\Google\Chrome\Application
there is a file called master_preferences.require_eula
to false
show_welcome_page
to false