Reason behind StaleElementException: Element gets destroy and gets recreated.
Following solutions are given on this link: https://www.softwaretestingmaterial.com/stale-element-reference-exception-selenium-webdriver/
- Refresh page
- Use ‘try-catch block’ within ‘for loop’
- Wait for the element till it gets available
- Using POM
No comments:
Post a Comment