feat: loop through each el in the path except the first and last

This commit is contained in:
karishmas6
2024-06-06 00:31:56 +05:30
parent 36c0af28c5
commit 4efd177406

View File

@@ -439,7 +439,13 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
}
): Generator<Node[]> {
if (path.length > 2 && path.length > config.optimizedMinLength) {
for (let i = 1; i < path.length - 1; i++) {
if (scope.counter > config.maxNumberOfTries) {
return; // Okay At least I tried!
}
scope.counter += 1;
}
}
}