EventFiringWebDriver PageSource Property WebDriver
Gets the source of the page last loaded by the browser.

Namespace: OpenQA.Selenium.Support.Events
Assembly: WebDriver.Support (in WebDriver.Support.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

public string PageSource { get; }

Implements

IWebDriver PageSource
Remarks

If the page has been modified after loading (for example, by JavaScript) there is no guarantee that the returned text is that of the modified page. Please consult the documentation of the particular driver being used to determine whether the returned text reflects the current state of the page or the text last sent by the web server. The page source returned is a representation of the underlying DOM: do not expect it to be formatted or escaped in the same way as the response sent from the web server.
See Also