feat: get the element's level (depth in DOM tree)
This commit is contained in:
@@ -272,6 +272,11 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
|
|||||||
function selector(path: Path): string {
|
function selector(path: Path): string {
|
||||||
let node = path[0];
|
let node = path[0];
|
||||||
let query = node.name;
|
let query = node.name;
|
||||||
|
for (let i = 1; i < path.length; i++) {
|
||||||
|
const level = path[i].level || 0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user