Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Add test method which allows to ensure the JS console is error free #399

Open
nemesifier opened this issue Aug 2, 2024 · 0 comments

Comments

@nemesifier
Copy link
Member

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 (openwisp/openwisp-controller#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do (general)
Development

No branches or pull requests

1 participant