• <legend id='IPZvV'><style id='IPZvV'><dir id='IPZvV'><q id='IPZvV'></q></dir></style></legend>
  • <small id='IPZvV'></small><noframes id='IPZvV'>

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

        <bdo id='IPZvV'></bdo><ul id='IPZvV'></ul>
      <tfoot id='IPZvV'></tfoot>

        Chrome 由自动化测试软件控制

        时间:2023-09-28
      1. <tfoot id='fINi0'></tfoot>
            <i id='fINi0'><tr id='fINi0'><dt id='fINi0'><q id='fINi0'><span id='fINi0'><b id='fINi0'><form id='fINi0'><ins id='fINi0'></ins><ul id='fINi0'></ul><sub id='fINi0'></sub></form><legend id='fINi0'></legend><bdo id='fINi0'><pre id='fINi0'><center id='fINi0'></center></pre></bdo></b><th id='fINi0'></th></span></q></dt></tr></i><div id='fINi0'><tfoot id='fINi0'></tfoot><dl id='fINi0'><fieldset id='fINi0'></fieldset></dl></div>

              <tbody id='fINi0'></tbody>

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

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

              • <bdo id='fINi0'></bdo><ul id='fINi0'></ul>
                  本文介绍了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 由自动化测试软件控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:org.openqa.selenium.remote.service.DriverService$Builder.crea 下一篇:端口无效.退出... org.openqa.selenium.os.OsProcess check

                  相关文章

                  最新文章

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

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

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

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