feat: implement finder for selector generation

This commit is contained in:
karishmas6
2024-06-05 10:36:06 +05:30
parent 28de16be12
commit a2d4dfb68c

View File

@@ -115,13 +115,26 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
}; };
function finder(input: Element, options?: Partial<Options>) {
const defaults: Options = {
root: document.body,
idName: (name: string) => true,
className: (name: string) => true,
tagName: (name: string) => true,
attr: (name: string, value: string) => false,
seedMinLength: 1,
optimizedMinLength: 2,
threshold: 1000,
maxNumberOfTries: 10000,
}; };
}
} }