feat: check if the modified path still uniquely identifies the element:

This commit is contained in:
karishmas6
2024-06-06 00:35:21 +05:30
parent e0072bdff9
commit ff3687c1fd

View File

@@ -450,7 +450,11 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
if (scope.visited.has(newPathKey)) {
return;
}
if (unique(newPath) && same(newPath, input)) {
yield newPath;
scope.visited.set(newPathKey, true);
yield* optimize(newPath, input, scope);
}
}
}
}