Element Lookup & Evaluation

Evaluate All

Find all elements matching an XPath expression.

Find all elements matching an XPath expression.

Evaluates an XPath query across the document and collects all matching DOM nodes. The matched elements are converted into GPAL element objects and returned as a list. If found, returns the element data; if no match exists, returns an empty result.

TIP

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

Examples

GPAL Fluent: High-level fluent C# API

List<GPALElement> elems = ElementHelper.FindWebElementsByXPath(Browser browser, SelectorPathEntry selectorPath, Selector selector, GPALElement null, false [bool IsPersistent]);

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.EvaluateAll(string xpath);

Puppeteer Client: Puppeteer-style C# client

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

Puppeteer Communicator: Low-level communicator

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

REST Client: Direct REST/HTTP client

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