HtmlElement.Net
Public Member Functions | Properties | List of all members
HtmlElements.Elements.HtmlPage Class Reference

Models a wed page loaded in browser and exposes some useful methods and properties More...

Inherits HtmlElements.WebDriverWrapper.

Public Member Functions

 HtmlPage (ISearchContext webDriverOrWrapper)
 Initializes new instance of a page by calling base class constructor More...
 
void Refresh ()
 Reload the current page More...
 
- Public Member Functions inherited from HtmlElements.WebDriverWrapper
object ExecuteScript (string script, params object[] args)
 Executes JavaScript in the context of the currently selected frame or window. More...
 
object ExecuteAsyncScript (string script, params object[] args)
 Executes JavaScript asynchronously in the context of the currently selected frame or window. More...
 
ReadOnlyCollection< IWebElement > FindElements (By @by)
 Finds all IWebElements within the current context using the given mechanism. More...
 
IWebElement FindElement (By @by)
 Finds the first T:OpenQA.Selenium.IWebElement using the given method. More...
 
TElement FindElement< TElement > (By @by)
 Finds the first IWebElement using given method and creates a page object of given type wrapping the element. More...
 
IList< TElement > FindElements< TElement > (By @by)
 Finds all IWebElements within the current context using the given mechanism and creates page objects wrapping it. More...
 
override string ToString ()
 Describes actual page object type and wrapped search context. More...
 

Properties

HtmlElement Body [get]
 HTML element which represents body tag of the current page More...
 
string CurrentUrl [get]
 URL of the current page More...
 
DocumentReadyState ReadyState [get]
 Loading status of the current document loaded or being loading in browser More...
 
string Source [get]
 Source code of the current page More...
 
string Title [get]
 Title of the current page More...
 
- Properties inherited from HtmlElements.WebDriverWrapper
IPageObjectFactory PageObjectFactory [get]
 Gets the page object factory used to initialize current page object instance. More...
 
IWebDriver WrappedDriver [get]
 Gets the T:OpenQA.Selenium.IWebDriver wrapped by current page object instance. More...
 

Additional Inherited Members

- Protected Member Functions inherited from HtmlElements.WebDriverWrapper
 WebDriverWrapper (ISearchContext webDriverOrWrapper)
 Initializes wrapper converting provided object to WebDriver More...
 

Detailed Description

Models a wed page loaded in browser and exposes some useful methods and properties

Constructor & Destructor Documentation

◆ HtmlPage()

HtmlElements.Elements.HtmlPage.HtmlPage ( ISearchContext  webDriverOrWrapper)

Initializes new instance of a page by calling base class constructor

Parameters
webDriverOrWrapperIWebDriver, IWebElement or anything else which is wrapping WebDriver instance and can be used for locating elements

Member Function Documentation

◆ Refresh()

void HtmlElements.Elements.HtmlPage.Refresh ( )

Reload the current page

Property Documentation

◆ Body

HtmlElement HtmlElements.Elements.HtmlPage.Body
get

HTML element which represents body tag of the current page

◆ CurrentUrl

string HtmlElements.Elements.HtmlPage.CurrentUrl
get

URL of the current page

◆ ReadyState

DocumentReadyState HtmlElements.Elements.HtmlPage.ReadyState
get

Loading status of the current document loaded or being loading in browser

◆ Source

string HtmlElements.Elements.HtmlPage.Source
get

Source code of the current page

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.

◆ Title

string HtmlElements.Elements.HtmlPage.Title
get

Title of the current page