GridPilot Academy

Why we snapshot locator trees before refactors

Hero image for Why we snapshot locator trees before refactors

Before touching a selector-heavy module, capture the current tree as plain text—not screenshots—so reviewers can see intent. Pair that snapshot with the riskiest user journey name so history stays searchable.

When the refactor lands, attach the diff of that snapshot to the pull request description. Teams that skip this step usually rediscover the same XPath six months later.

We teach the habit in Selenium Signals because it costs minutes and saves hours of merge ping-pong. It also plays nicely with mentor reviews: they can comment on the snapshot without pulling a heavy branch.

If you adopt one takeaway from this article, make it the pairing of snapshot plus journey label. Everything else is optional polish.

← Back to blog