I have a problem, I need create a log from my test (Selenium, python). I know how to write all logs,
That is too much. I would like only logs with errors. In addition, I noticed that I do not have a "POST" log in. How to correct the code?
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
caps = DesiredCapabilities.CHROME
caps['loggingPrefs'] = {'performance': 'ALL'}
self.driver = webdriver.Chrome(desired_capabilities=caps)
self.driver.get('http://site/login')
for entry in self.driver.get_log('performance'):
print(entry['message'])
thank you