Element Info & Attributes

Get Shadow Root

Returns a GPALElement of the element's parent in JSON format including attributes, geometry, visibility state, identifiers, multiple locator strategies (XPath and CSS), and key properties such as text, value, and source URLs. The function enriches the element with positional data, bounding box metrics, and alternative selectors for robust identification, then returns the serialized result as a JSON string.

NOTE

CSSAttributes, DOMAttributes and DomProperties are lazy loaded on first usage.

Examples

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.GetShadowRoot("#shadow-host");

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.GetShadowRoot("#shadow-host").Execute<GPALElement>();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.GetShadowRoot("#shadow-host");

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.GetShadowRoot("#shadow-host").Execute<GPALElement>();

💬 Ask GPAL