在Chrome中停用开发者模式扩展程序 [英] Disable developer mode extensions pop up in Chrome
问题描述
<这似乎是进攻性的延伸,但对我来说,这是一个潜在的危险的扩展,因为它是由chromedriver使用的。
找到了一个解决办法,因为我无法回滚到以前的版本或找到旧版本的安装程序回滚到,这对我的测试玩弄破坏。
使用下面的代码片段
ChromeOpt离子选项=新的ChromeOptions();
options.addArguments(chrome.switches, - disable-extensions);
System.setProperty(webdriver.chrome.driver,(System.getProperty(user.dir)+//src//test//resources//chromedriver_new.exe));
驱动程序=新的ChromeDriver(选项);
Since the latest release of chrome (34.0.1847.116) last week, I have been receiving the "Disable developer mode extensions" when running automated tests using watir-webdriver.
This seems to be the offensive extension but it doesn't make sense to me that this is a potentially hazardous extension given its used by the chromedriver.
Anyone that has found a fix for this, as i am unable to roll back to the previous version or find an installer for an older version to roll back to and this is playing havoc with my tests.
While creating chrome driver, use option to disable it. Its working without any extensions.
Use following code snippet
ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.switches","--disable-extensions");
System.setProperty("webdriver.chrome.driver",(System.getProperty("user.dir") + "//src//test//resources//chromedriver_new.exe"));
driver = new ChromeDriver(options);
这篇关于在Chrome中停用开发者模式扩展程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!