在Chrome中停用开发者模式扩展程序 [英] Disable developer mode extensions pop up in Chrome

查看:409
本文介绍了在Chrome中停用开发者模式扩展程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从上周发布最新版本的Chrome(34.0.1847.116)以来,我一直在使用watir-webdriver运行自动化测试时收到禁用开发者模式扩展。



<这似乎是进攻性的延伸,但对我来说,这是一个潜在的危险的扩展,因为它是由chromedriver使用的。



找到了一个解决办法,因为我无法回滚到以前的版本或找到旧版本的安装程序回滚到,这对我的测试玩弄破坏。





解决方案

使用下面的代码片段

  ChromeOpt离子选项=新的ChromeOptions(); 
options.addArguments(chrome.switches, - disable-extensions);
System.setProperty(webdriver.chrome.driver,(System.getProperty(user.dir)+//src//test//resources//chromedriver_new.exe));
驱动程序=新的C​​hromeDriver(选项);


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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆