Navigation

Get Page Source

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

browser.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

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

💬 Ask GPAL