Chrome devmode suddenly turning on in selenium

前端 未结 2 1773
遥遥无期
遥遥无期 2020-12-17 06:34

I am using a script daily. It\'s a headless chrome that just checks a site every 5 minutes and suddenly devmode turned on and i can\'t seem to turn it off. This is my script

相关标签:
2条回答
  • 2020-12-17 07:09

    I managed to fix it finally :D

    options.add_argument('--log-level=3')
    

    That was all it took.

    0 讨论(0)
  • 2020-12-17 07:12

    I was running into the same issue and adding the log-level argument only did not work for me.

    On Windows you obviously need to add the following option to your ChromeOptions as well:

    options.add_experimental_option('excludeSwitches', ['enable-logging'])
    

    As described here: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2907#c3

    0 讨论(0)
提交回复
热议问题