Skip to content

Fix StaleElementReferenceException in locator chain#39

Merged
rconner46 merged 1 commit intomasterfrom
fix-stale-element-references-in-locator-chain
Mar 6, 2025
Merged

Fix StaleElementReferenceException in locator chain#39
rconner46 merged 1 commit intomasterfrom
fix-stale-element-references-in-locator-chain

Conversation

@rconner46
Copy link
Contributor

What changed?

Switch the SearchContext in the LocatorChain to use our LazyWebElement in place of the WebElement from getUnderlyingWebElement(). This will allow us to catch the StaleElementReferenceException, reinitialize the parent, and retry locating the element.

@rconner46 rconner46 merged commit c9ed14e into master Mar 6, 2025
6 of 7 checks passed
@rconner46 rconner46 deleted the fix-stale-element-references-in-locator-chain branch March 6, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments