Table of Contents

Interface IFrame

Namespace
HP.LFT.SDK.Web
Assembly
HP.LFT.SDK.dll

A Web frame object that represents both the frame element in a frame set and an embedded frame that uses the iframe element.

public interface IFrame : ITestObject, IWebTestObject, IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider
Inherited Members
Extension Methods

Remarks

The frame is a separate HTML document that is part of the test object hierarchy.

Properties

Text

The inner text of the body element.

string Text { get; }

Property Value

string

Url

The URL of the frame.

string Url { get; }

Property Value

string

Methods

Describe<TChild>(IDescription)

Describes a child test object.

TChild Describe<TChild>(IDescription description) where TChild : class, ITestObject

Parameters

description IDescription

The child test object description

Returns

TChild

The requested child test object with its description

Type Parameters

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.

TChild Describe<TChild>(CSSDescription cssSelector) where TChild : class, IWebElement

Parameters

cssSelector CSSDescription

The CSS selector query used to find the child test object

Returns

TChild

The requested child test object with its description

Type Parameters

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.

TChild Describe<TChild>(XPathDescription xpath) where TChild : class, IWebElement

Parameters

xpath XPathDescription

The XPath used to find the child test object

Returns

TChild

The requested child test object with its description

Type Parameters

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 given JavaScript code in the frame's context and returns the result.

string RunJavaScript(string scriptToRun)

Parameters

scriptToRun string

The JavaScript code to run.

Returns

string

The result of running the JavaScript code as a string.

RunJavaScript<TResult>(string)

Runs the given JavaScript code in the frame's context and returns the result.

TResult RunJavaScript<TResult>(string scriptToRun)

Parameters

scriptToRun string

The JavaScript code to run

Returns

TResult

The result of running the JavaScript code converted to TResult

Type Parameters

TResult

The type of return value

Sync()

Waits for the frame's state to be idle.

void Sync()