Turn off logging in python selenium
Post

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.

image

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.

关于软件稳定性测试的思路

设置 Python Selenium 中的Log显示信息