We have a webpage where it logs the output using console.log() method. I am trying to automate it using selenium webdriver Python bindings. I read about the "driver.get_log('browser')" and used it, but it only displays the JavaScript error messages and does not obtain the actual output logged in the console.
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
d = DesiredCapabilities.FIREFOX
d['loggingPrefs'] = { 'browser':'ALL' }
fp = webdriver.FirefoxProfile()
driver = webdriver.Firefox(capabilities=d,firefox_profile=fp)
for entry in driver.get_log('browser'):
print entry
I do not want the error logs in console. I want the actual output of the webpage displayed in browser console.
actual output of the webpage? And why you want to see it in browser console? Do you actually know purpose of browser console?