久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

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

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

        Selenium chromedriver 禁用日志記錄或將其重定向 ja

        Selenium chromedriver disable logging or redirect it java(Selenium chromedriver 禁用日志記錄或將其重定向 java)

        <tfoot id='jSokM'></tfoot>

      1. <small id='jSokM'></small><noframes id='jSokM'>

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

                  <bdo id='jSokM'></bdo><ul id='jSokM'></ul>
                • <legend id='jSokM'><style id='jSokM'><dir id='jSokM'><q id='jSokM'></q></dir></style></legend>
                  本文介紹了Selenium chromedriver 禁用日志記錄或將其重定向 java的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試在迷你網絡爬蟲中使用 selenium 來獲取頁面源.我的輸出日志被 selenium 日志入侵,有沒有辦法完全禁用日志記錄或只是以某種方式將其重定向到/dev/null?

                  I am trying to use selenium in a mini web crawler to get the page source. My output log is invaded by selenium logs, is there a way to totally disable the logging or just redirect it in someway to /dev/null?

                  日志消息如下:

                  Starting ChromeDriver 2.43.600233 
                  (523efee95e3d68b8719b3a1c83051aa63aa6b10d) on port 1628
                  Only local connections are allowed.
                  ott 24, 2018 7:52:01 PM org.openqa.selenium.remote.ProtocolHandshake createSession
                  INFORMAZIONI: Detected dialect: OSS
                  

                  我通過以下方式調用驅動程序:

                  I am calling the driver in the following way:

                  WebDriver driver = null;
                              try {
                              System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
                              ChromeOptions chromeOptions = new ChromeOptions();
                              chromeOptions.setBinary("/usr/bin/chromium");
                              chromeOptions.addArguments("--headless");
                              chromeOptions.addArguments("--silent");
                              chromeOptions.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
                              driver = new ChromeDriver(chromeOptions);
                              /*FirefoxBinary firefoxBinary = new FirefoxBinary();
                              firefoxBinary.addCommandLineOptions("--headless");
                              System.setProperty("webdriver.gecko.driver", "/usr/local/bin/geckodriver");
                              System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
                              System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");
                  
                  
                              FirefoxOptions firefoxOptions = new FirefoxOptions();
                              firefoxOptions.setBinary(firefoxBinary);
                              FirefoxDriver driver = new FirefoxDriver(firefoxOptions);*/
                              if(driver!=null) {
                              driver.get(link);
                  

                  推薦答案

                  好吧,我終于擺脫了那些無用的日志記錄.這就是我所做的.
                  使用:
                  System.setProperty("webdriver.chrome.silentOutput", "true");

                  要擺脫 chromedriver 日志:

                  Ok i have managed to finally get rid of that useless loggings. Here is what i did.
                  Use:
                  System.setProperty("webdriver.chrome.silentOutput", "true");

                  To get rid of chromedriver logs:

                  啟動 ChromeDriver 2.43.600233(523efee95e3d68b8719b3a1c83051aa63aa6b10d) 在端口 1628 上僅限本地允許連接.

                  Starting ChromeDriver 2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d) on port 1628 Only local connections are allowed.


                  并使用:java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);
                  擺脫硒日志:


                  And use: java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);
                  To get rid of selenium logs:

                  2018 年 2 月 24 日下午 7:52:01 org.openqa.selenium.remote.ProtocolHandshakecreateSession INFORMAZIONI:檢測到的方言:OSS

                  ott 24, 2018 7:52:01 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFORMAZIONI: Detected dialect: OSS

                  這篇關于Selenium chromedriver 禁用日志記錄或將其重定向 java的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創(chuàng)建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                  <legend id='Dlfy7'><style id='Dlfy7'><dir id='Dlfy7'><q id='Dlfy7'></q></dir></style></legend>
                • <tfoot id='Dlfy7'></tfoot>
                      <bdo id='Dlfy7'></bdo><ul id='Dlfy7'></ul>
                        <tbody id='Dlfy7'></tbody>
                    • <i id='Dlfy7'><tr id='Dlfy7'><dt id='Dlfy7'><q id='Dlfy7'><span id='Dlfy7'><b id='Dlfy7'><form id='Dlfy7'><ins id='Dlfy7'></ins><ul id='Dlfy7'></ul><sub id='Dlfy7'></sub></form><legend id='Dlfy7'></legend><bdo id='Dlfy7'><pre id='Dlfy7'><center id='Dlfy7'></center></pre></bdo></b><th id='Dlfy7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Dlfy7'><tfoot id='Dlfy7'></tfoot><dl id='Dlfy7'><fieldset id='Dlfy7'></fieldset></dl></div>

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

                            主站蜘蛛池模板: 欧美国产视频一区二区 | 欧美精品电影一区 | 国产一区二区三区在线免费 | 日韩a在线 | 亚洲一级视频在线 | 天天拍天天操 | 亚洲视频在线观看一区二区三区 | 国产精品视频综合 | av在线视| 99re视频在线免费观看 | 午夜影晥 | 一区二区亚洲 | 欧美日韩精品久久久免费观看 | 欧美成人性生活 | 欧美精品一区二区三区在线 | 久久精品91久久久久久再现 | 亚洲天堂av在线 | 欧美久久一级特黄毛片 | 亚洲成人av在线 | 久久久久久国产精品免费免费狐狸 | 成人在线观看免费 | 国产精品久久久久久久久久久免费看 | 亚洲欧美视频 | 在线日韩| 午夜丰满少妇一级毛片 | 好好的日在线视频 | 91久久夜色 | 国产不卡在线 | 91极品欧美视频 | 亚洲国产成人精品女人久久久 | 日韩有码在线观看 | 亚洲欧美另类在线观看 | 国产伦精品一区二区三区视频金莲 | 日日日日操 | 91视频在线看 | 福利视频一区二区 | 久草网址 | 盗摄精品av一区二区三区 | 中文精品视频 | 亚洲色视频 | 四虎成人精品永久免费av九九 |