Table of Contents

Interface IWebTestObject

A generic Web test object used only for implementation. Do not use to describe a concrete web test object.

Namespace: HP.LFT.SDK.Web
Assembly: HP.LFT.SDK.dll
Syntax
public interface IWebTestObject : IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider

Properties

Attributes

Returns a copy of the collection of attributes that is attached to the element for instance 'id','class',etc.

Declaration
IReadOnlyDictionary<string, string> Attributes { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>

ClassName

The object's CSS class.

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

Id

The object's HTML identifier.

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

InnerHTML

The HTML code contained between the object's start and end tags.

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

InnerText

The text contained between the object's start and end tags.

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

Name

The object's name property.

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

OuterHTML

The object's HTML code and its content.

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

OuterText

The object's text.

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

Styles

Returns the element's computed styles as a dictionary with the name of the style as the key.

Declaration
IReadOnlyDictionary<string, string> Styles { get; }
Property Value
Type Description
IReadOnlyDictionary<string, string>
Remarks

Returns an empty collection when run against Internet Explorer 8 or when the document mode of another Internet Explorer version is set to Internet 8 or earlier.

TagName

The object's HTML tag.

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

Title

The element's title attribute.

Declaration
string Title { 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.

GetAttribute(string)

Returns the value of a single attribute.

Declaration
string GetAttribute(string attributeName)
Parameters
Type Name Description
string attributeName

The attribute name for the value to retrieve.

Returns
Type Description
string

The value of the specified attribute (null if the attribute does not exist).

GetComputedStyle(string)

Returns the value of a single style.

Declaration
string GetComputedStyle(string styleProperty)
Parameters
Type Name Description
string styleProperty

The style property for the value to retrieve.

Returns
Type Description
string

The value of the specified style (null if the style property does not exist).

Extension Methods

TestObjectExtensions.WaitUntilVisible<T>(T)
TestObjectExtensions.WaitUntilVisible<T>(T, int)