You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Thank you for providing the details. I am looking into it. I was able to come up with a solution that logs the selector for stale element reference error. I am now trying to enhance that to add the link of code to it.
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
The text was updated successfully, but these errors were encountered: