I want to obtain logs generated by webdriver client bindings when a command is executed. Basically, I want the log representation of JSON wire protocol communication that happens between the client and the driver.
I tried doing that for Webdriver java client for ChromeDriver but that doesn't help.
System.setProperty("webdriver.chrome.driver","path-to-driver.exe");
DesiredCapabilities caps = DesiredCapabilities.chrome();
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.CLIENT,Level.ALL);
caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);
ChromeOptions options = new ChromeOptions();
options.merge(caps);
WebDriver driver = new ChromeDriver(options);
System.out.println(driver.manage().logs().getAvailableLogTypes());
Output:
If you see the console output it says:
"Ignoring unrecognized log type: client"
But driver.manage().logs().getAvailableLogTypes() does include client. Any help?
Related question: Monitoring JSON wire protocol logs