MCPcopy Create free account
hub / github.com/InverseUI/InverseUI-Recorder / check

Method check

util/dom_utils.js:609–628  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

607 const checkInterval = 100; // Check every 100ms
608
609 const check = () => {
610 const element = this.findElement(xpath);
611
612 if (element && this.isElementVisible(element)) {
613 resolve({
614 success: true,
615 xpath: xpath,
616 waitTime: Date.now() - startTime,
617 element: {
618 tagName: element.tagName,
619 id: element.id,
620 className: element.className
621 }
622 });
623 } else if (Date.now() - startTime > timeout) {
624 reject(new Error(`Timeout waiting for element: ${xpath}`));
625 } else {
626 setTimeout(check, checkInterval);
627 }
628 };
629
630 check();
631 });

Callers

nothing calls this directly

Calls 2

findElementMethod · 0.95
isElementVisibleMethod · 0.95

Tested by

no test coverage detected