Interface IPage
An HTML page.
public interface IPage : ITestObject, IWebDescriber, ITestObjectDescriber, ISupportsNativeObject
- Inherited Members
- Extension Methods
Properties
AbsoluteLocation
This object's absolute coordinates relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.
Point AbsoluteLocation { get; }
Property Value
Size
This object's size (in pixels).
Size Size { get; }
Property Value
Text
The inner text of the body element.
string Text { get; }
Property Value
Title
This page's title.
string Title { get; }
Property Value
Url
The URL of this HTML page.
string Url { get; }
Property Value
Methods
Describe<TChild>(IDescription)
Describes a child test object.
TChild Describe<TChild>(IDescription description) where TChild : class, ITestObject
Parameters
descriptionIDescriptionThe child test object description
Returns
- TChild
The requested child test object with its description
Type Parameters
TChildThe child test object type
Remarks
The current instance test object is the parent of the returned test object. This test object is searched for only when an operation on this test object is invoked. This means that if the test object is not found in the application, this command will still succeed. In this case, an exception is thrown only when an operation is invoked.
Describe<TChild>(CSSDescription)
Describes a child test object using the provided CSS selector.
TChild Describe<TChild>(CSSDescription cssSelector) where TChild : class, IWebElement
Parameters
cssSelectorCSSDescriptionThe CSS selector query used to find the child test object
Returns
- TChild
The requested child test object with its description
Type Parameters
TChildThe child test object type
Remarks
The current instance test object is the parent of the returned test object. This test object is searched for only when an operation on this test object is invoked. This means that if the test object is not found in the application, this command will still succeed. In this case, an exception is thrown only when an operation is invoked.
Describe<TChild>(XPathDescription)
Describes a child test object using the provided XPath.
TChild Describe<TChild>(XPathDescription xpath) where TChild : class, IWebElement
Parameters
xpathXPathDescriptionThe XPath used to find the child test object
Returns
- TChild
The requested child test object with its description
Type Parameters
TChildThe child test object type
Remarks
The current instance test object is the parent of the returned test object. This test object is searched for only when an operation on this test object is invoked. This means that if the test object is not found in the application, this command will still succeed. In this case, an exception is thrown only when an operation is invoked.
RunJavaScript(string)
Runs the specified JavaScript code in the page's context and returns the result.
string RunJavaScript(string scriptToRun)
Parameters
scriptToRunstringThe JavaScript code to run.
Returns
- string
The JavaScript code to run.
RunJavaScript<TResult>(string)
Runs the specified JavaScript code in the page's context and returns the result.
TResult RunJavaScript<TResult>(string scriptToRun)
Parameters
scriptToRunstringThe JavaScript code to run.
Returns
- TResult
The JavaScript code to run.
Type Parameters
TResultThe type of return value.
Sync()
Waits for the page state to be idle.
void Sync()