小编Var*_*ati的帖子

无法使用Selenium Webdriver打开Chrome浏览器.管理员禁用加载解压缩的扩展名

我使用Selenium Webdriver,C#,Visual Studio和Chrome浏览器自动化我的应用程序.

当selenium试图打开Chrome浏览器时,我正在低于弹出窗口.

Failed to load extension from:C:\Users\VARA~1.PAK\AppData\Local\Temp\scoped_dir6712_14913\internal.
Loading of unpacked extensions is disabled by the administrator.
Run Code Online (Sandbox Code Playgroud)

点击弹出窗口的确定按钮后,Chrome就会成功打开,但由于以下错误,我的测试失败了.

Test Name:  _3_EnterDetailsAndSelectAnAddress_John
Test FullName:  Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress_John
Test Source:     : line 2147483647
Test Outcome:   Failed
Test Duration:  0:00:47.8059413

Result Message: 
Test method Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress_John threw exception: 
System.InvalidOperationException: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
  (Session info: chrome=41.0.2272.118)
  (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)
Assert.Fail failed. Please check through the execution report against scenario
Result …
Run Code Online (Sandbox Code Playgroud)

c# selenium google-chrome selenium-chromedriver chrome-automation-extension

4
推荐指数
1
解决办法
2万
查看次数