Frames, Shadow DOM & Scoping

In Element

Scope subsequent selectors to within a given element.

Scope subsequent selectors to within a given element.

Sets the matched element as the search root, so that following selectors are evaluated relative to it instead of the full document.

TIP

At the PuppeteerCommunicator layer this is currently a placeholder/no-op; the actual scoping is handled at the Browser layer.

Examples

GPAL Fluent: High-level fluent C# API

browser .InElement("#container") .WithSelector("#child") .LeftClick();

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.InElement("#container");

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.InElement("#container").Execute();

Puppeteer Communicator: Low-level communicator

//Currently a TODO/placeholder in PuppeteerCommunicator; nesting of search roots is not yet implemented at this layer.

PuppeteerCommunicator.InElement("#container");

REST Client: Direct REST/HTTP client

//Internally maps to WithEndpoint(ApiEndpoint.SwitchToElement).WithElementId(selector) - ApiEndpoint.InElement is declared but never dispatched.

GPAL.OttoMagicClient.InElement("#container").Execute();