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

Stale element reference errors should report the element and/or line of code it considers stale #4184

Open
reallymello opened this issue Apr 10, 2024 · 0 comments

Comments

@reallymello
Copy link
Contributor

Description

Often when automating pages that do in place updates of the DOM or if the same selector exists between state transitions Nightwatch may report a stale element reference in the test output during test execution (depending how defensively the test is written). While the error is logged, Nightwatch does not report which element or line of code it is executing that it considers stale which makes troubleshooting and resolving the error difficult--especially in large test suites. Often I have to set breakpoints and slowly narrow in on sections of code until I find it which can be very time consuming in larger test suites.

Suggested solution

Log the selector considered stale and/or the line of code so one can quickly identify what step is encountering a stale element exception.

For newer users, including the possible cause/solution messages similar to what was added for other error types may be helpful as well.

Alternatives / Workarounds

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant