Element Lookup & Evaluation

Query Selectors

Find all elements matching a CSS selector.

Find all elements matching a CSS selector.

Searches for the all DOM elements matching the provided CSS selector within the configured search root. 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.FindWebElementsByCss(Browser browser, SelectorPathEntry selectorPath, Selector selector, GPALElement null, false [bool IsPersistent]);

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.QuerySelectors(string css);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.QuerySelectors(string css).Execute<List<GPALElement>>();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.QuerySelectors(string css, string sessionId);

REST Client: Direct REST/HTTP client

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