What is the easiest way to get chrome console js errors with Selenium python
This is what i am using but I am not able to get full error message
results = (self.driver.get_log('browser'))
print results
What is the easiest way to get chrome console js errors with Selenium python
This is what i am using but I am not able to get full error message
results = (self.driver.get_log('browser'))
print results
Here is working:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
dc = DesiredCapabilities.CHROME
dc['goog:loggingPrefs'] = { 'browser':'ALL' }
driver = webdriver.Chrome(desired_capabilities=dc)
driver.implicitly_wait(30)
for entry in driver.get_log('browser'):
print(entry)
driver.quit()
Maybe this will help? Looks like you need to pass on the desired capabilities before getting the log.