mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-02 02:30:07 +00:00
fix invalid css query on linked elements (#372)
This commit is contained in:
parent
59fa78e642
commit
20f6fd2a10
1 changed files with 7 additions and 3 deletions
|
@ -830,9 +830,13 @@ function buildTreeFromBody() {
|
||||||
let linkedElements = new Array();
|
let linkedElements = new Array();
|
||||||
const elementId = currentEle.getAttribute("id");
|
const elementId = currentEle.getAttribute("id");
|
||||||
if (elementId) {
|
if (elementId) {
|
||||||
linkedElements = [
|
try {
|
||||||
...document.querySelectorAll(`label[for="${elementId}"]`),
|
linkedElements = [
|
||||||
];
|
...document.querySelectorAll(`label[for="${elementId}"]`),
|
||||||
|
];
|
||||||
|
} catch (e) {
|
||||||
|
console.log("failed to query labels: ", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const labelled = currentEle.getAttribute("aria-labelledby");
|
const labelled = currentEle.getAttribute("aria-labelledby");
|
||||||
if (labelled) {
|
if (labelled) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue