How to execute chrome with verbose logging


#1

Hi,

I’m trying to pull some more detailed logs from chrome in a test case at the moment, but when I do retrieve the logs, it’s just warning and errors, not info or other information.

I’ve been trying to run this with the verbose flag for chrome, but I’m not sure exactly where or how to do this. I’ve mostly been looking in settings, under execution settings, but no matter how I’ve tried to set it up (currently trying things such as:

Name: verboseLogging
Type: Boolean
Value: true

but I’m having no luck.

does anyone know how to run chrome in verbose through the execution settings? thanks.


#2

Or, rather, having dug deeper into this:

I’ve got some code that produces (I believe) the desired result

DesiredCapabilities caps = DesiredCapabilities.chrome()
LoggingPreferences logPrefs = new LoggingPreferences()
logPrefs.enable(LogType.BROWSER, Level.INFO)
caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs)

but I now need to pass caps into Katalon to be used as the capabilities of the default driver. Is there any easy way to do this through code? or, if not, how would I format it in the execution settings?


#3

I’m having the same issue did you find a solution?


#4

A possible solution to your problem would be to use the chrome command lines --enable-logging and --log-level (–log-level sets it to the ALL although this can be changed).
I find this a helpful reference https://peter.sh/experiments/chromium-command-line-switches/


#5

Recently discovered that you can view the command line options for the webdriver chrome by going to the command prompt and going chromedriver -help this should show you all the desired capabilities you can use. :slight_smile: