spress warnings selenium python

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

Here is what the above code is Doing:
1. We are creating a ChromeOptions object.
2. We are adding an experimental option to the ChromeOptions object.
3. We are passing the ChromeOptions object to the Chrome driver.

The experimental option we are adding is called excludeSwitches.
This option is used to exclude certain Chrome switches from being passed to the Chrome driver.

The Chrome switch we are excluding is called enable-logging.
This switch is used to enable Chrome logging.

By excluding this switch, we are disabling Chrome logging.