Console Logging - Selenium and Katalon

Do you know the appropriate desired capabilities for getting info logs?

None is there. I think it is unlikely that some desired capability is defined in future for getting browser logs.

-------------

I will tell you why.

LogEntries logs = driver.manage().logs().get("browser")

The above one line is using Selenium Logging API. See https://github.com/SeleniumHQ/selenium/wiki/Logging. The Selenim Logging API was a part of the Selenium WebDriver API. The Selenium WebDriver API was defined by the Selenium project sometime around 2009.

Nowadays, the Selenium WebDriver API has become a sort of heritage; it is destined to be superseded by the W3C WebDrvier specification (https://www.w3.org/TR/webdriver/). All of browsers are supposed to support the W3C WebDriver as de facto.

The Desired Capability concept is a part of the W3C Web Driver specification: https://www.w3.org/TR/webdriver/#capabilities

We should be aware that the W3C WebDriver API does NOT include any Logging API. The W3C WebDriver team is not going to put high priority to Selenium Logging API-equivalent feature. You can read a comment by a member of the W3C WebDriver spec team in the following post:

https://github.com/mozilla/geckodriver/issues/330

andreastt commented on 25 Apr 2017

Well, we need to come to agreement with the other browser vendors about a sensible API. I don’t think the polling nature of the Selenium API is particularly sensible, but it may be the only option given the restrictions of having an HTTP protocol.

The tracking issue on the WebDriver standard is w3c/webdriver#406, but as we are just finishing up “level 1” for Candidate Recommendation, it is unlikely to be worked on in the near future.

2 Likes