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

Method isElementVisible

util/dom_utils.js:485–498  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

483
484 // Check if element is visible
485 isElementVisible(element) {
486 if (!element) return false;
487
488 const style = window.getComputedStyle(element);
489 const rect = element.getBoundingClientRect();
490
491 return style.display !== 'none' &&
492 style.visibility !== 'hidden' &&
493 style.opacity !== '0' &&
494 rect.width > 0 &&
495 rect.height > 0 &&
496 (rect.top + rect.height) > 0 &&
497 (rect.left + rect.width) > 0;
498 }
499
500 // Get element value (handles different element types)
501 getElementValue(xpath) {

Callers 3

assertElementMethod · 0.95
getElementPropertiesMethod · 0.95
checkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected