After tests are run, I want to collect all console error messages displayed in the console(Open Firebug -> Click on Console -> Click on Errors) using Selenium WebDriver + Java.
I tried the answer mentioned here, but it only displays messages for 'Warnings', 'Info' but not for 'Errors'
I want only Console errors like -
Can someone please help me how to get those Console log?
Use JSErrorCollector, to collect javascript errors (those coming up in the console) from firefox through java.
it gets as simple as this,
final List<JavaScriptError> jsErrors = JavaScriptError.readErrors(driver);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With