<tfoot id='fuKYE'></tfoot>

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

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

    1. <legend id='fuKYE'><style id='fuKYE'><dir id='fuKYE'><q id='fuKYE'></q></dir></style></legend>

      加载扩展时出错无法从“C:..LocalTempscoped_dir6312_32763internal"加载

      Error Loading Extension Could not load extension from #39;C:..LocalTempscoped_dir6312_32763internal#39;. Loading of unpacked extensions is disabled(加载扩展时出错无法从“C:..LocalTempscoped_dir6312_32763internal加载扩展.已禁用加载未打包的扩
      <i id='XE1md'><tr id='XE1md'><dt id='XE1md'><q id='XE1md'><span id='XE1md'><b id='XE1md'><form id='XE1md'><ins id='XE1md'></ins><ul id='XE1md'></ul><sub id='XE1md'></sub></form><legend id='XE1md'></legend><bdo id='XE1md'><pre id='XE1md'><center id='XE1md'></center></pre></bdo></b><th id='XE1md'></th></span></q></dt></tr></i><div id='XE1md'><tfoot id='XE1md'></tfoot><dl id='XE1md'><fieldset id='XE1md'></fieldset></dl></div>
      <legend id='XE1md'><style id='XE1md'><dir id='XE1md'><q id='XE1md'></q></dir></style></legend>

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

            <tbody id='XE1md'></tbody>

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

                本文介绍了加载扩展时出错无法从“C:..LocalTempscoped_dir6312_32763internal"加载扩展.已禁用加载未打包的扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                当我运行我的 webdriver 脚本时,我会收到一个确认对话框,其中包含以下消息:

                When am running my webdriver script, am getting a confirmation dialog box with below message:

                加载扩展出错

                无法从C:UsersusernameAppDataLocalTempscoped_dir6312_32763internal"加载扩展.管理员禁止加载解压的扩展.

                Could not load extension from 'C:UsersusernameAppDataLocalTempscoped_dir6312_32763internal'. Loading of unpacked extensions is disabled by the administrator.

                要重试吗?

                是 否

                点击是"让测试运行.

                我不知道为什么会提示这个对话框,

                I am not sure why am I getting this dialog box prompted,

                我已经尝试了下面提到的解决方法,但它们都不起作用:

                I've tried the mentioned workarounds below but neither of them are working:

                1. 用最新版本替换了 chrome 驱动程序.
                2. 在我的脚本中添加以下代码:

                1. Replaced chrome driver with latest version.
                2. Added below code in my script:

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

                下面是我的测试方法:

                public void Login() throws IOException{
                    test = extent.startTest("Login");
                    signInPage = new SignInPage(driver);
                    signInPage.enterMailId();   
                    String screenShotPath = GetScreenShot.capture(driver, "enterMailId");
                    test.log(LogStatus.PASS, "Email id is entered successfully: " + test.addScreenCapture(screenShotPath));
                    signInPage.enterpwd();
                    //test.log(LogStatus.INFO, "Password is entered successfully");
                    screenShotPath = GetScreenShot.capture(driver, "enterpwd");
                    test.log(LogStatus.PASS, "Password is entered successfully: " + test.addScreenCapture(screenShotPath));
                    signInPage.clickOnLogin();
                    test.log(LogStatus.PASS, "User logged in successfully");
                }
                

                下面是调用浏览器的方法:

                Below is the method which invoke the browser:

                private  void initChromeBrowser(){
                    System.setProperty("webdriver.chrome.driver", userdir +"\chromedriver.exe");
                    ChromeOptions options = new ChromeOptions();
                    options.addArguments("test-type");
                    options.addArguments("no-sandbox");
                    //Fix for cannot get automation extension
                    options.addArguments("disable-extensions");
                    options.addArguments("start-maximized");
                    options.addArguments("--js-flags=--expose-gc");         
                    options.addArguments("disable-plugins");
                    options.addArguments("--enable-precise-memory-info"); 
                    options.addArguments("--disable-popup-blocking");
                    options.addArguments("--disable-default-apps");
                    options.addArguments("test-type=browser");
                    options.addArguments("disable-infobars");
                    driver = new ChromeDriver(options);
                    launchApp();
                }
                

                我是否应该在我的脚本中加入任何其他内容以防止出现该对话框.

                Could there be anything else that I should incorporate in my script to prevent the dialog box.

                推荐答案

                您可以将 useAutomationExtension 能力设置为 false.

                You can set the useAutomationExtension capability to false.

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

                此功能将有助于不加载 Chrome 自动化扩展程序.因此,加载扩展失败"弹出窗口不会出现.

                This capability will help to not load Chrome Automation extension. Due to which, "Failed to load extension" popup would not appear.

                但请注意,如果没有 Chrome 自动化扩展,您将无法执行任何窗口大小调整/定位操作.

                But please note you will not be able to perform any window resizing/positioning operations without the Chrome automation extension.

                希望这会有所帮助!

                来源:https://bugs.chromium.org/p/chromedriver/issues/detail?id=1749

                这篇关于加载扩展时出错无法从“C:..LocalTempscoped_dir6312_32763internal"加载扩展.已禁用加载未打包的扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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如何按不区分大小写进行搜索)
                <legend id='XPVq2'><style id='XPVq2'><dir id='XPVq2'><q id='XPVq2'></q></dir></style></legend>

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

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

                        <tfoot id='XPVq2'></tfoot>