Navigation

Get CSS Attributes

Extract relevant computed CSS properties.

Extract relevant computed CSS properties.

Retrieves the elements computed styles and filters them down to a predefined set of meaningful CSS properties, excluding default or non-informative values, then returns a simplified object of key styling attributes.

Examples

GPAL Fluent: High-level fluent C# API

var cssAttributes = gPalElement.CssAttributes()

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.GetCssAttribute(string css); GPAL.MagicHelper.GetCssAttribute(string xpath);

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.GetCssAttributes(string css).Execute(); browser.PuppeteerClient.GetCssAttributes(string xpath).Execute();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.GetCssAttributes(string selector, string sessionId);

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.GetCssAttributes).WithCss(string css).Execute(); GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.GetCssAttributes).WithXPath(string xpath).Execute();