Turn off logging in python selenium

Python selenium will print a lot of debug info for selenium driver, which will mess up important information for your testing.

To turn it off, please add bellow code before test case.

1
2
from selenium.webdriver.remote.remote_connection import LOGGER
LOGGER.setLevel(logging.WARNING)

Note: above code should be put before webdriver initialization.

Toby Qin wechat
欢迎到微信里去当吃瓜群众