Navigation

Get Page Source

Return the full page HTML from the top-level frame.

Return the full page HTML from the top-level frame.

Checks if the current context is the main window (not an iframe) and, if so, returns the complete HTML content of the page by sending document.documentElement.outerHTML as the response.

Examples

GPAL Fluent: High-level fluent C# API

browser.GetPageSource(out string pageSource)

MagicHelper: MagicHelper utility library

GPAL.MagicHelper.GetPageSource();

Puppeteer Client: Puppeteer-style C# client

browser.PuppeteerClient.GetPageSource().Execute<string>();

Puppeteer Communicator: Low-level communicator

await browser.PuppeteerCommunicator.GetPageSource(string sessionId);

REST Client: Direct REST/HTTP client

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