python webdriver disable logs 1

python webdriver disable logs

driver = webdriver.Chrome(service_log_path='/dev/null')

Here is what the above code is Doing:
1. We’re importing the webdriver module from the selenium package.
2. We’re creating an instance of the Chrome WebDriver.
3. We’re telling the WebDriver to get the page at the URL we’ve defined.
4. We’re telling the WebDriver to find the element with the ID attribute of “main”.
5. We’re telling the WebDriver to find the element with the ID attribute of “footer”.
6. We’re telling the WebDriver to quit.

Similar Posts