Chrome Console logs not printing Violations

2019-08-19 00:55发布

问题:

I am using Selenium with Chrome Driver to crawl websites. Need to get everything that gets printed on the chrome console.

Ex: I need Warning and Violation from console below

chrome_debug.log doesn't contain Violations.

I have tried passing arg "--verbose", "--v0", "--v1" to chrome driver, I have also tried setting LoggingPreferences loggingPreferences.enable(LogType.BROWSER, Level.ALL) with no luck. What am I missing here?