Element Lookup & Evaluation

Evaluate

Evaluates the provided XPath expression and returns the first matching DOM element as a GPAL element object. If found, returns the element data; if no match exists, returns an empty result.

NOTE

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

Examples

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.Evaluate(string xpath);

Puppeteer Client: Puppeteer-style C# client

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

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.Evaluate(string xpath, string sessionId);

REST Client: Direct REST/HTTP client

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

💬 Ask GPAL