Issue
Ok this may be very obv but I can't seem to figure out how to remove the logs in the selenium terminal. I have looked at most threads and found nothing. Thank you for your time :)
Code:
import time
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
# Hide the tons of logs
os.environ['WDM_LOG_LEVEL'] = '0'
options = Options()
options.add_argument("--headless")
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
time.sleep(1000)
Wanted Removed:
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
DevTools listening on ws://127.0.0.1:55488/devtools/browser/4bac099d-3e3b-40e6-a082-db3e95719f41```
Solution
This will run selenium in completely silent mode.
options = Options()
options.headless = True
options.add_experimental_option("excludeSwitches", ["enable-logging"])
Answered By - yasuisgod
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.