Frames, Shadow DOM & Scoping

Switch To Default Content

Sets the element search root to the full document.

Sets the element search root to the full document.

Sets the element search root to the full document.

Examples

GPAL Fluent: High-level fluent C# API

browser.InMainDom();

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.SwitchToDefaultContent();

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.SwitchToDefaultContent().Execute();

Puppeteer Communicator: Low-level communicator

//Resets CurrentContextId, CurrentFrameId, CurrentFrameSessionId, and CurrentShadowRootObjectId back to the top-level document.

await browser.PuppeteerCommunicator.InMainDom();

REST Client: Direct REST/HTTP client

GPAL.OttoMagicClient.WithEndpoint(ApiEndpoint.SwitchToDefaultContent).Execute();