similarity-based element relocation #449
Arroh-Yadav
started this conversation in
General
Replies: 1 comment 1 reply
|
I looked into it a bit and basically it scores page elements by comparing things like the tag, attributes, path, text, parent, and siblings, then averages the scores. Small changes like renaming a class usually work fine, but a bigger layout change can make the score drop fast because most of the checks are based on structure. I also noticed the parent tags are compared like normal strings, child tags are saved but never used, and adaptive mode only runs when the old selector finds nothing, so if it matches the wrong thing it wont try to fix it. Overall it handles small changes well, but bigger structure changes can break it pretty easily. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The similarity-based element relocation in adaptive mode is the part I'm most curious about — when a target's structure changes enough that CSS/XPath breaks, what's actually driving the "similar enough" match (attribute overlap, tree position, text content, something else)? Trying to understand where that approach's limits are — e.g., does it degrade gracefully or fail hard when a page's whole layout paradigm shifts rather than just individual elements moving.
All reactions