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

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

      <tfoot id='vR3Tz'></tfoot>

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

        禁用 Chrome 通知 (Selenium)

        时间:2023-06-27
      2. <tfoot id='AlfxY'></tfoot>
        <legend id='AlfxY'><style id='AlfxY'><dir id='AlfxY'><q id='AlfxY'></q></dir></style></legend>
          <tbody id='AlfxY'></tbody>

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

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

                  本文介绍了禁用 Chrome 通知 (Selenium)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我只想在 Selenium Java 应用程序打开的 Chrome 中禁用 Chrome 通知.(使用java代码)

                  I just want to disable Chrome notifications in the Chrome opened by a Selenium Java application. (using java code)

                  类似这样的通知:

                  问题是关闭浏览器窗口后手动设置的设置会丢失.

                  The problem is that settings manually set are lost after browser's window is closed.

                  推荐答案

                  此问题已在chromedriver-users"谷歌论坛中得到解答.这是有效的答案:

                  This question was answered in the: "chromedriver-users" google forum. This is the working answer:

                  Map<String, Object> prefs = new HashMap<String, Object>();
                  prefs.put("profile.default_content_setting_values.notifications", 2);
                  ChromeOptions options = new ChromeOptions();
                  options.setExperimentalOption("prefs", prefs);
                  WebDriver driver = new ChromeDriver(options);
                  

                  这篇关于禁用 Chrome 通知 (Selenium)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:org.openqa.selenium.NoSuchSessionException:在使用 ChromeDriver 下一篇:Selenium Select - 通过部分文本选择下拉选项

                  相关文章

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

                  <tfoot id='q5S8G'></tfoot>

                  • <bdo id='q5S8G'></bdo><ul id='q5S8G'></ul>
                  <legend id='q5S8G'><style id='q5S8G'><dir id='q5S8G'><q id='q5S8G'></q></dir></style></legend>

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