feat: use fallback if too many combinations found
This commit is contained in:
@@ -255,6 +255,14 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
|
||||
fallback?: () => Path | null
|
||||
): Path | null {
|
||||
const paths = sort(combinations(stack));
|
||||
|
||||
if (paths.length > config.threshold) {
|
||||
return fallback ? fallback() : null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user