Element Info & Attributes

Is Displayed

Determines whether an element is currently displayed in the DOM by verifying it exists, is not hidden via CSS, has non-zero dimensions, and is attached to a rendered layout. Returns false if the element is not present, not visible, or cannot be safely evaluated.

Examples

GPAL Fluent: High-level fluent C# API

bool isDisplayed = gPalElement.Displayed

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.IsDisplayed(string css);

GPAL.MagicHelper.IsDisplayed(string xpath);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.IsDisplayed(string css).Execute();

browser.PuppeteerClient.IsDisplayed(string xpath).Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.IsDisplayed(string elementId, string sessionId);

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.IsDisplayed).WithCss(string css).Execute();

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.IsDisplayed).WithXPath(string xpath).Execute();

💬 Ask GPAL