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
Currently, we just use the next best selector we find, starting from generic to specific. But too generic selectors are bad, e.g. div most likely has no meaning, and on the other hand, to specific selectors like the full path are likely too specific and will break.
Maybe there's a heuristic for good selectors. An idea:
What if we compute selectivity for each selector, e.g. how unique this selector is on the whole page. Would prefer ids and unique classes and discourage generic selectors. We then take the most selective but simplest selector.
The text was updated successfully, but these errors were encountered:
Currently, we just use the next best selector we find, starting from generic to specific. But too generic selectors are bad, e.g.
div
most likely has no meaning, and on the other hand, to specific selectors like the full path are likely too specific and will break.Maybe there's a heuristic for good selectors. An idea:
What if we compute
selectivity
for each selector, e.g. how unique this selector is on the whole page. Would prefer ids and unique classes and discourage generic selectors. We then take the most selective but simplest selector.The text was updated successfully, but these errors were encountered: