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

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

        Chrome 由自动化测试软件控制

        时间:2023-06-27
          • <bdo id='2pYMJ'></bdo><ul id='2pYMJ'></ul>

            • <small id='2pYMJ'></small><noframes id='2pYMJ'>

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

                  <tfoot id='2pYMJ'></tfoot><legend id='2pYMJ'><style id='2pYMJ'><dir id='2pYMJ'><q id='2pYMJ'></q></dir></style></legend>

                  本文介绍了Chrome 由自动化测试软件控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Serenity BDD (Selenium) 在 Chrome 中运行自动化测试.

                  I am running automated tests in Chrome with Serenity BDD (Selenium).

                  我必须下载新的 ChromeDriver,因为我的测试无法运行 -> 测试会打开 ChromeDriver,但无法以用户身份浏览".当我用谷歌搜索这个问题时,他们说我必须更新 ChromeDriver.

                  I had to download a new ChromeDriver, because my tests could not run -> The test would open ChromeDriver but could not "Browse as user". When I googled the issue, they said I had to update ChromeDriver.

                  所以我将 ChromeDriver 更新到 2.28 版,并将 Chrome 版本更新到 57.0.2987.98 版.

                  So I updated ChromeDriver to version 2.28 and I also updated the Chrome version to Version 57.0.2987.98.

                  但是现在 - 每次我运行测试时都会出现这个烦人的文本:

                  But now - EVERY TIME I run my tests this annoying text comes up:

                  Chrome 由自动化测试软件控制

                  Chrome is being controlled by automated test software

                  它询问我是否要保存密码.(我不能加图片,因为我没有足够的点")

                  And it asks me if I want to save password. (I can't add pictures because I don't have enough "points")

                  在以前的版本中,我设法通过以下方式阻止了这两件事:

                  In the previous version, I had managed to block these 2 things by:

                  public class CustomChromeDriver implements DriverSource {
                  
                      @Override
                      public WebDriver newDriver() {
                          try {
                              DesiredCapabilities capabilities = DesiredCapabilities.chrome();
                              Proxy proxy = new Proxy();
                              String proxyServer = String.format("AProxyIDontWantToDisplay", System.getenv("proxy.username"), System.getenv("proxy.password"));
                              proxy.setHttpProxy(proxyServer);
                              capabilities.setCapability("proxy", proxy);
                              ChromeOptions options = new ChromeOptions();
                              options.addArguments(Arrays.asList("--no-sandbox","--ignore-certificate-errors","--homepage=about:blank","--no-first-run"));
                              capabilities.setCapability(ChromeOptions.CAPABILITY, options);
                              ChromeDriver driver = new ChromeDriver(capabilities);
                              return driver;
                          } catch (Exception e) {
                              throw new Error(e);
                          }
                      }
                  
                      @Override
                      public boolean takesScreenshots() {
                          return true;
                      }
                  }
                  

                  我知道有这个(同一个问题的链接),但是有太多的答案不起作用.

                  I know there is this one (A link to same issue), but there are too many answers that don't work.

                  有谁知道如何删除它?

                  推荐答案

                  将此添加到您传递给驱动程序的选项中:

                  Add this to the options you pass to the driver:

                  options.addArguments("disable-infobars");
                  

                  这篇关于Chrome 由自动化测试软件控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:WebDriverException:未知错误:Runtime.executionContextCreated 具有无效 下一篇:端口无效.退出... org.openqa.selenium.os.OsProcess checkForError 同时

                  相关文章

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

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

                        <bdo id='ZXzoV'></bdo><ul id='ZXzoV'></ul>

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

                      <tfoot id='ZXzoV'></tfoot>