Is your feature request related to a problem? Please describe.
We are not checking JS console errors in Selenium tests.
Describe the solution you'd like
I think we need to add a method which asserts whether the JS console is free from errors, if there's any we should fail the test and print the errors to the output to allow fast debugging.
Describe alternatives you've considered
In some cases we may expect errors, so we could also add a method to assert for the presence of an error, but before proceeding with this we need to have a concrete use case.
Is your feature request related to a problem? Please describe. We are not checking JS console errors in Selenium tests.
Describe the solution you'd like I think we need to add a method which asserts whether the JS console is free from errors, if there's any we should fail the test and print the errors to the output to allow fast debugging.
Describe alternatives you've considered In some cases we may expect errors, so we could also add a method to assert for the presence of an error, but before proceeding with this we need to have a concrete use case.
Additional context While debugging a flaky Selenium browser based test in OpenWISP Controller (https://github.com/openwisp/openwisp-controller/issues/902), I found out the following JS console error:
Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808.