<legend id='pVSYo'><style id='pVSYo'><dir id='pVSYo'><q id='pVSYo'></q></dir></style></legend>

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

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

        如何在启动 chrome 浏览器时安装插件?

        How to install plugin while launch the chrome browser?(如何在启动 chrome 浏览器时安装插件?)

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

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

              • <tfoot id='KSD7M'></tfoot>

                  <bdo id='KSD7M'></bdo><ul id='KSD7M'></ul>
                  本文介绍了如何在启动 chrome 浏览器时安装插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 selenium、cucumber 和 java 进行自动化测试.

                  I am using selenium,cucumber and java for automation testing.

                  我需要在 chrome 浏览器中安装插件才能打开我的应用程序.这个插件我已经安装了.但是当我通过 selenium 打开 chrome 浏览器时,这个插件丢失并且应用程序无法正常工作.

                  I have a requirement of installing a plugin to the chrome browser to open my application. This plugin I have already installed. But when I open the chrome browser through selenium this plugin is missing and application is not working.

                  每次打开浏览器时如何安装插件?

                  How to install the plugin each time when the browser is opening?

                  推荐答案

                  我正在使用 Chrome 65.0Selenium 3.11.0

                  步骤:

                  1. 在 Chrome 中运行以下 URL:chrome://version/
                  2. 复制 Chrome 配置文件路径.
                  3. 在 Windows 资源管理器中打开 Chrome 配置文件路径.
                  4. 打开扩展文件夹(查看安装扩展时的日期和时间戳)
                  5. 复制文件夹路径.

                  代码:

                  public static void main(String[] args){
                      System.setProperty("webdriver.chrome.driver", "F:\Automation\chromedriver.exe");
                              String pathToExtension = "C:\Users\USER_DELL_2014_07\AppData\Local\Google\Chrome\User Data\Profile 3\Extensions\bhlhnicpbhignbdhedgjhgdocnmhomnp\2.0_0";
                              ChromeOptions options = new ChromeOptions();
                              options.addArguments("load-extension=" + pathToExtension);
                              WebDriver driver = new ChromeDriver(options);
                              driver.manage().window().maximize();
                            }
                  

                  就是这样!您可以使用此代码,chrome 将使用给定的扩展名进行实例化

                  That's it! You can use this code and chrome would be instantiated with the given extension

                  如果您对此有任何疑虑,请告诉我.

                  Please let me know if you have any concerns related to this.

                  这篇关于如何在启动 chrome 浏览器时安装插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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如何按不区分大小写进行搜索)

                  <tfoot id='LBD1J'></tfoot>

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

                      <bdo id='LBD1J'></bdo><ul id='LBD1J'></ul>
                        1. <small id='LBD1J'></small><noframes id='LBD1J'>

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