• <legend id='0J2GK'><style id='0J2GK'><dir id='0J2GK'><q id='0J2GK'></q></dir></style></legend>

    <small id='0J2GK'></small><noframes id='0J2GK'>

    <tfoot id='0J2GK'></tfoot>

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

        禁用 Chrome 通知 (Selenium)

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

          • <small id='92ZEp'></small><noframes id='92ZEp'>

          • <tfoot id='92ZEp'></tfoot>

                <legend id='92ZEp'><style id='92ZEp'><dir id='92ZEp'><q id='92ZEp'></q></dir></style></legend>
                  <bdo id='92ZEp'></bdo><ul id='92ZEp'></ul>
                  本文介绍了禁用 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                  相关文章

                  最新文章

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

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

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

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