N
N
NoKit2021-05-14 14:12:16
Python
NoKit, 2021-05-14 14:12:16

Why doesn't driver.get_log('browser') output the latest message?

I am testing a python web application using selenium. I get the chrome console log by starting the driver with additional options:

d = DesiredCapabilities.CHROME
d['goog:loggingPrefs'] = {'browser': 'ALL'}
self.browser = webdriver.Chrome(desired_capabilities=d, executable_path='chromedriver ')

And then I output the log to the console:

for entry in self.browser.get_log('browser'):
logger.debug(entry)

For some reason, the latest message is not displayed, I tried to set a small delay of 10-15 seconds, but it does not help .

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question