selenium chrome options suppress warnings python 1

selenium chrome options suppress warnings python

options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)

Here is what the above code is Doing:
1. We’re importing the webdriver module from the selenium package.
2. We’re creating a ChromeOptions object, which we’ll use to set some options for the browser.
3. We’re adding an experimental option to the ChromeOptions object. This option will disable logging in the browser.
4. We’re creating a Chrome webdriver object, passing in the options we created.

Similar Posts