• <legend id='eX0SX'><style id='eX0SX'><dir id='eX0SX'><q id='eX0SX'></q></dir></style></legend>

        <i id='eX0SX'><tr id='eX0SX'><dt id='eX0SX'><q id='eX0SX'><span id='eX0SX'><b id='eX0SX'><form id='eX0SX'><ins id='eX0SX'></ins><ul id='eX0SX'></ul><sub id='eX0SX'></sub></form><legend id='eX0SX'></legend><bdo id='eX0SX'><pre id='eX0SX'><center id='eX0SX'></center></pre></bdo></b><th id='eX0SX'></th></span></q></dt></tr></i><div id='eX0SX'><tfoot id='eX0SX'></tfoot><dl id='eX0SX'><fieldset id='eX0SX'></fieldset></dl></div>

        • <bdo id='eX0SX'></bdo><ul id='eX0SX'></ul>
        <tfoot id='eX0SX'></tfoot>

        <small id='eX0SX'></small><noframes id='eX0SX'>

      1. 无法从 scoped_dir6312_32763/internal 加载扩展.管理员使用 ChromeDriver Se

        Could not load extension from scoped_dir6312_32763/internal.Loading of unpacked extensions is disabled by the administrator with ChromeDriver Selenium(无法从 scoped_dir6312_32763/internal 加载扩展.管理员使用 ChromeDriver Selenium 禁用了加载

          1. <tfoot id='kL3iy'></tfoot>

            • <bdo id='kL3iy'></bdo><ul id='kL3iy'></ul>

                  <tbody id='kL3iy'></tbody>

                <i id='kL3iy'><tr id='kL3iy'><dt id='kL3iy'><q id='kL3iy'><span id='kL3iy'><b id='kL3iy'><form id='kL3iy'><ins id='kL3iy'></ins><ul id='kL3iy'></ul><sub id='kL3iy'></sub></form><legend id='kL3iy'></legend><bdo id='kL3iy'><pre id='kL3iy'><center id='kL3iy'></center></pre></bdo></b><th id='kL3iy'></th></span></q></dt></tr></i><div id='kL3iy'><tfoot id='kL3iy'></tfoot><dl id='kL3iy'><fieldset id='kL3iy'></fieldset></dl></div>
              1. <small id='kL3iy'></small><noframes id='kL3iy'>

                <legend id='kL3iy'><style id='kL3iy'><dir id='kL3iy'><q id='kL3iy'></q></dir></style></legend>
                  本文介绍了无法从 scoped_dir6312_32763/internal 加载扩展.管理员使用 ChromeDriver Selenium 禁用了加载解压扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用 vue-cli 3 创建了一个项目,它会自动为我设置 e2ed 测试.当我尝试运行测试时,我从 chrome 中弹出一个窗口,告诉我管理员已禁用加载解压扩展".

                  这似乎是一个常见问题,提供了一种解决方案

                  错误信息为...

                  加载扩展出错无法从以下位置加载扩展:'C:Usersuser_nameAppDataLocalTempscoped_dir6312_32763internal'.管理员禁止加载解压的扩展.行

                  ...表示扩展程序尚未加载,因为它已被管理员禁用.

                  <小时>

                  根据讨论 无法从以下位置加载扩展:...管理员禁用加载解压扩展程序 ChromeDriver使用Chrome自动化扩展程序来自动执行各种功能,如窗口大小调整、窗口定位等.

                  Failed to load extension.. 弹窗表示此扩展尚未加载.如果您手动关闭弹出窗口,浏览器将正常运行,ChromeDriver 命令将继续按预期工作.但在这种情况下,如果您尝试执行窗口大小调整或窗口重新定位命令,则会抛出 unknown error: cannot get automation extension 错误.

                  <小时>

                  背景

                  直到 ChromeDriver v2.28 每当组织管理员政策禁止扩展,绕过限制用户使用参数 disable-extensions 如下:

                  ChromeOptions 选项 = new ChromeOptions();options.addArguments("--disable-extensions");WebDriver driver = new ChromeDriver(options);

                  而且效果很好.

                  ChromeDriver v2.28 以后,只要 disable-extensions 标志通过测试,ChromeDriver 就会隐式通过 disable-extensions-except 标志依次加载 Chrome 自动化扩展.此扩展帮助 Chromedriver 执行窗口大小调整和窗口重新定位操作.

                  因此,如果您的组织管理员策略阻止扩展,则显示弹出 Failed to load extension from: ... Loading of unpacked extensions 是预期行为.

                  此问题依赖于 Selenium 对 headless 的支持.

                  <小时>

                  解决方法

                  作为替代方案,您可以将 useAutomationExtension 功能设置为 false,如下所示:

                  ChromeOptions 选项 = new ChromeOptions();options.setExperimentalOption("useAutomationExtension", false);WebDriver driver = new ChromeDriver(options);

                  此功能反过来将有助于不加载 Chrome 自动化扩展程序,并且不会出现 Failed to load extension 弹出窗口.但是如果没有 Chrome 自动化扩展程序,您将无法执行任何窗口大小调整/定位操作.

                  现在,Selenium 对无头的支持正在解决ChromeDriver 将不再需要此扩展程序,您不应该看到此错误/弹出窗口.

                  解决方案

                  最简单的解决方案是使用最新版本的 ChromeDriverChrome 组合在以下任一选项中:

                  • 如果您使用的是Chrome 73版,请下载ChromeDriver 73.0.3683.20
                  • 如果您使用的是 Chrome 版本 72,请下载 ChromeDriver 2.46ChromeDriver 72.0.3626.69
                  • 如果您使用的是 Chrome 版本 71,请下载 ChromeDriver 2.46ChromeDriver 71.0.3578.137
                  • 对于旧版 Chrome,请参阅此 讨论.

                  另类

                  其他一些选择是:

                  • 注册表项 ExtensionInstallWhitelist 添加到白名单
                  • 删除 Registry Key ExtensionInstallBlacklist 包含字符串键 1*

                  I have created a project using vue-cli 3 which automatically set up e2ed tests for me. When I try to run the tests, I get a popup from chrome, telling me that "Loading of unpacked extensions is disabled by the administrator".

                  This seems to be a common problem, one solution offered elsewhere is

                  ChromeOptions o = new ChromeOptions();
                  o.addArguments("disable-extensions");
                  o.addArguments("--start-maximized");
                  WebDriver driver = new ChromeDriver(o);
                  

                  Now this is Java code, but I assume there's a way to achieve the same thing in a vue.js project. However, I have no idea where to put this configuration.

                  解决方案

                  This popup:

                  with the error message as...

                  Error Loading Extension
                  Failed to load extension from: 'C:Usersuser_nameAppDataLocalTempscoped_dir6312_32763internal'. Loading of unpacked extensions is disabled by the administrator.
                  OK
                  

                  ...implies that an extension has not been loaded as it is disabled by the administrator.


                  As per the discussion Failed to load extention from: ... Loading of unpacked extensions is disabled by the administrator ChromeDriver uses Chrome automation extension for automating various functions like window sizing, window positioning, etc.

                  The Failed to load extension.. popup means that this extension has not been loaded. If you manually close the popup, browser will act normally and ChromeDriver commands will continue to work as expected. But in this case if you try executing window resizing or window re-positioning commands, it will throw an error as unknown error: cannot get automation extension.


                  Background

                  Till ChromeDriver v2.28 whenever an organizations admin policy forbidden extensions, to bypass the restriction users have used the argument disable-extensions as follows:

                  ChromeOptions options = new ChromeOptions();
                  options.addArguments("--disable-extensions");
                  WebDriver driver = new ChromeDriver(options);
                  

                  and it worked perfecto.

                  ChromeDriver v2.28 onwards, whenever disable-extensions flag is passed by test, ChromeDriver implicitly passes disable-extensions-except flag which in turn loads Chrome automation extension. This extension helps Chromedriver to perform window sizing and window re-positioning operations.

                  So, if your organizational admin policy blocks extensions, display of popup Failed to load extension from: ... Loading of unpacked extensions is an expected behavior.

                  This issue had a dependency on Selenium support for headless.


                  Work around

                  As an alternative, you can set the useAutomationExtension capability to false as follows:

                  ChromeOptions options = new ChromeOptions();
                  options.setExperimentalOption("useAutomationExtension", false);
                  WebDriver driver = new ChromeDriver(options);
                  

                  This capability inturn will help to not load Chrome Automation extension and Failed to load extension popup would not appear. But you will not be able to perform any window resizing/positioning operations without the Chrome automation extension.

                  Now, Selenium support for headless being resolved ChromeDriver will no longer require this extension and you shouldn't have seen this error/popup.

                  Solution

                  The simplest solution would be to use the latest version of ChromeDriver and Chrome combination among either of the following:

                  • If you are using Chrome version 73, please download ChromeDriver 73.0.3683.20
                  • If you are using Chrome version 72, please download ChromeDriver 2.46 or ChromeDriver 72.0.3626.69
                  • If you are using Chrome version 71, please download ChromeDriver 2.46 or ChromeDriver 71.0.3578.137
                  • For older version of Chrome, please see this discussion.

                  Alternative

                  Some other alternatives are:

                  • Add the Registry Key ExtensionInstallWhitelist to whitelist
                  • Remove the Registry Key ExtensionInstallBlacklist containing a string key 1 with value *

                  这篇关于无法从 scoped_dir6312_32763/internal 加载扩展.管理员使用 ChromeDriver Selenium 禁用了加载解压扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                  How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                  KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                  How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                  How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                  Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)
                      • <bdo id='UJAYE'></bdo><ul id='UJAYE'></ul>
                      • <legend id='UJAYE'><style id='UJAYE'><dir id='UJAYE'><q id='UJAYE'></q></dir></style></legend>

                        <i id='UJAYE'><tr id='UJAYE'><dt id='UJAYE'><q id='UJAYE'><span id='UJAYE'><b id='UJAYE'><form id='UJAYE'><ins id='UJAYE'></ins><ul id='UJAYE'></ul><sub id='UJAYE'></sub></form><legend id='UJAYE'></legend><bdo id='UJAYE'><pre id='UJAYE'><center id='UJAYE'></center></pre></bdo></b><th id='UJAYE'></th></span></q></dt></tr></i><div id='UJAYE'><tfoot id='UJAYE'></tfoot><dl id='UJAYE'><fieldset id='UJAYE'></fieldset></dl></div>

                          • <small id='UJAYE'></small><noframes id='UJAYE'>

                              <tbody id='UJAYE'></tbody>
                            <tfoot id='UJAYE'></tfoot>