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

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

string PageSource { get; }
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