Showndisplayed
Showndisplayed is a conceptual term used in web development and automated UI testing to describe the condition in which an element is both shown in the document object model (DOM) and displayed on the screen. The term is not part of any formal specification; rather, it emerges in documentation and test scripts as a shorthand for combining two distinct checks: presence in the DOM (shown) and renderability (displayed).
Shown refers to an element that exists in the DOM tree and has not been removed or
Displayed refers to an element that is rendered and perceivable by the user. In most toolchains, this
Showndisplayed is true when both conditions are met: the element is present in the DOM and it
Common methods to evaluate it include:
- element != null and isConnected
- computedStyle.display != 'none' and computedStyle.visibility != 'hidden'
- element.getBoundingClientRect().width > 0 and height > 0
Variations exist across frameworks; some libraries use isDisplayed or isVisible to capture the same concept, with