I am wondering if watir-webdriver as the ability to log the output of any console errors? This would be equivalent to manually opening the console in a browser and watching for JS errors as a page loads. Can I capture this through watir-webdriver and log/error on?
If it will be helpful to someone - this solution should work:
def check_console_log
console_log = @browser.driver.manage.logs.get(:browser)
if console_log != nil
raise(console_log)
end
end
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