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

      <tfoot id='8VR5i'></tfoot>

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

      Selenium ChromeDriver 如何禁用消息:"DevTools on ws

      时间:2023-09-14

      • <legend id='oADug'><style id='oADug'><dir id='oADug'><q id='oADug'></q></dir></style></legend>
          <tbody id='oADug'></tbody>
        <tfoot id='oADug'></tfoot>
            1. <small id='oADug'></small><noframes id='oADug'>

              <i id='oADug'><tr id='oADug'><dt id='oADug'><q id='oADug'><span id='oADug'><b id='oADug'><form id='oADug'><ins id='oADug'></ins><ul id='oADug'></ul><sub id='oADug'></sub></form><legend id='oADug'></legend><bdo id='oADug'><pre id='oADug'><center id='oADug'></center></pre></bdo></b><th id='oADug'></th></span></q></dt></tr></i><div id='oADug'><tfoot id='oADug'></tfoot><dl id='oADug'><fieldset id='oADug'></fieldset></dl></div>
                <bdo id='oADug'></bdo><ul id='oADug'></ul>
                本文介绍了Selenium ChromeDriver 如何禁用消息:"DevTools on ws的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                所以我正在使用 chrome 无头浏览器创建一个机器人,它工作得很好.我收到了很多警告,所以我在使用这些命令重新搜索后禁用了它们:

                So I am creating a bot with chrome headless browser and it works just fine. I had quite a lot warnings so I disabled them after reasearch with those commands:

                ChromeOptions option = new ChromeOptions();
                        option.AddArgument("--headless");
                        option.AddArgument("--silent");
                        option.AddArgument("--disable-gpu");
                        option.AddArgument("--log-level=3");
                
                
                        ChromeDriverService service = ChromeDriverService.CreateDefaultService();
                        service.SuppressInitialDiagnosticInformation = true;
                
                
                        _driver = new ChromeDriver(service, option);
                

                但是当程序启动时还有一条消息显示:

                But there is one more message showing when programs starts:

                DevTools listening on ws://127.0.0.1:12015/devtools/browser/6b70a3c5-56c8-4c90-952a-d0e0ef254ddf
                

                知道如何禁止它显示吗?

                Any idea how to disable it from showing?

                推荐答案

                如果您尝试在 Windows 上使用 Python 修复 Selenium,请输入:

                If you are trying to fix Selenium with Python on Windows, type:

                from selenium.webdriver.chrome.options import Options
                
                options = Options()
                options.add_argument('headless')
                options.add_experimental_option('excludeSwitches', ['enable-logging'])
                browser = webdriver.Chrome(options=options)
                

                experimental_option 行是特殊的调味料.

                with the experimental_option line being the special sauce.

                这篇关于Selenium ChromeDriver 如何禁用消息:"DevTools on ws的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:Selenium WebDriver.ChromeDriver Nuget 包已安装,但不适用于 MSTest 下一篇:Selenium C# 打开新选项卡 CTRL+T 不使用 CHROME

                相关文章

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

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

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

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