Reputation: 1
This solution works in Chrome, but in IE I keep facing this error:
Message:
Failed: Command not found: POST /session/798d3aecb62d1bbb9e31c521af84b9182eed519f/log
Stack:
WebDriverError: Command not found: POST /session/798d3aecb62d1bbb9e31c521af84b9182eed519f/log
at Object.checkLegacyResponse (/Users/agupta7/Documents/data-surveyor-client-side/node_modules/selenium-webdriver/lib/error.js:542:13)
at parseHttpResponse (/Users/agupta7/Documents/data-surveyor-client-side/node_modules/selenium-webdriver/lib/http.js:509:13)
at /Users/agupta7/Documents/data-surveyor-client-side/node_modules/selenium-webdriver/lib/http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:97:5)
From: Task: WebDriver.manage().logs().get(performance)
Any solution to fetch the network logs in IE11 browser with protractor (I am using it with BrowserStack)?
Upvotes: 0
Views: 297
Reputation: 204
IE driver does not support getting logs. However, network logs can be generated via an MiTM proxy.
BrowserStack does the exact same thing with the network logs capability.
"browserstack.networkLogs": "true"
This works for IE 11 on Windows 10 as mentioned here: https://www.browserstack.com/automate/capabilities
In the case of your protractor test, you need to add the above capability in your configuration.
The logs appear on the dashboard.
Upvotes: 0
Reputation: 21363
As far as I know, the ChromeDriver supports performance logging, but IE WebDriver doesn't support the logging APIs, and doesn't support getting logs of any kind. Because, the IE driver implements the W3C WebDriver Specification, which does not supply any log retrieval end points at all. Moreover, even if the driver were to implement the logging API, getting the console log in IE would still be impossible, since Internet Explorer does not provide any programmatic access to its debugging tools.
Here are some similar threads, you could check them:
InternetExplorerDriver can't retrieve browser logs
Unable to get browser logs from IE and chrome
Besides, since the IE driver is available on GitHub, and pull requests implementing new features are accepted. You could try to feedback this request on IE Driver Github forum.
Upvotes: 1