Table of Contents

Interface IPage

An HTML page.

Namespace: HP.LFT.SDK.Web
Assembly: HP.LFT.SDK.dll
Syntax
public interface IPage : ITestObject, IWebDescriber, ITestObjectDescriber, ISupportsNativeObject

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.

Declaration
Point AbsoluteLocation { get; }
Property Value
Type Description
Point

Size

This object's size (in pixels).

Declaration
Size Size { get; }
Property Value
Type Description
Size

Text

The inner text of the body element.

Declaration
string Text { get; }
Property Value
Type Description
string

Title

This page's title.

Declaration
string Title { get; }
Property Value
Type Description
string

Url

The URL of this HTML page.

Declaration
string Url { get; }
Property Value
Type Description
string

Methods

Describe<TChild>(IDescription)

Describes a child test object.

Declaration
TChild Describe<TChild>(IDescription description) where TChild : class, ITestObject
Parameters
Type Name Description
IDescription description

The child test object description

Returns
Type Description
TChild

The requested child test object with its description

Type Parameters
Name Description
TChild

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

Declaration
TChild Describe<TChild>(CSSDescription cssSelector) where TChild : class, IWebElement
Parameters
Type Name Description
CSSDescription cssSelector

The CSS selector query used to find the child test object

Returns
Type Description
TChild

The requested child test object with its description

Type Parameters
Name Description
TChild

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

Declaration
TChild Describe<TChild>(XPathDescription xpath) where TChild : class, IWebElement
Parameters
Type Name Description
XPathDescription xpath

The XPath used to find the child test object

Returns
Type Description
TChild

The requested child test object with its description

Type Parameters
Name Description
TChild

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

Declaration
string RunJavaScript(string scriptToRun)
Parameters
Type Name Description
string scriptToRun

The JavaScript code to run.

Returns
Type Description
string

The JavaScript code to run.

RunJavaScript<TResult>(string)

Runs the specified JavaScript code in the page's context and returns the result.

Declaration
TResult RunJavaScript<TResult>(string scriptToRun)
Parameters
Type Name Description
string scriptToRun

The JavaScript code to run.

Returns
Type Description
TResult

The JavaScript code to run.

Type Parameters
Name Description
TResult

The type of return value.

Sync()

Waits for the page state to be idle.

Declaration
void Sync()

Extension Methods

TestObjectExtensions.WaitUntilExists<T>(T)
TestObjectExtensions.WaitUntilExists<T>(T, int)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>, int)