feat: try each candidate path to see if it uniquely identifies an element on the webpage
This commit is contained in:
@@ -260,6 +260,12 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
|
|||||||
return fallback ? fallback() : null;
|
return fallback ? fallback() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (let candidate of paths) {
|
||||||
|
if (unique(candidate)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user