IAIObject Interface
An object identified using Artificial Intelligence.

C# Syntax

Remarks
See the OpenText Functional Testing for Developers Help Center for more details on using AI to identify objects in your application.
Public Properties
 NameDescription
PropertyValue ()

The value is based on the following object properties: text for text objects, state for toggleable controls, and value for input fields, text boxes, and combo boxes.

C# Syntax

string Value {get;}
PropertyDisplayNameThe object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
PropertyParentThe parent test object of this test object. The child object must be obtained using the Describe method, otherwise, it returns null. (Inherited from HP.LFT.SDK.ITestObject)
Top
Public Methods
 NameDescription
MethodClick ()

Clicks in the middle of the AI object.

C# Syntax

void Click( )

MethodDoubleClick ()

Double-clicks in the middle of the AI object. This method is not supported for mobile applications.

C# Syntax

void DoubleClick( )

MethodExists

Checks whether this object exists in the AUT before the default object synchronization timeout elapses.

(Inherited from HP.LFT.SDK.ITestObject)

MethodFindChildren<TChild>Returns all the child test objects that match the specified test object type and description filter. For example, you can use this method to retrieve all Web buttons on a Page with type="submit". (Inherited from HP.LFT.SDK.ITestObject)
MethodDescribe<TChild>Creates a child test object of this test object. (Inherited from HP.LFT.SDK.ITestObjectDescriber)
MethodGetDescriptionReturns a clone of the description for this test object. The test object must be obtained using the Describe method, otherwise, this method returns null. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetSnapshotCaptures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetTextLocationsReturns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
MethodGetVisibleTextReturns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
MethodHighlightHighlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
MethodHighlightMatches<TChild>Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
MethodHover ()

Holds the cursor over an AI object. This method is not supported for mobile applications.

C# Syntax

void Hover( )

MethodHover (int duration)

Holds the cursor over an AI object for a specified duration. This method is not supported for mobile applications.

C# Syntax

void Hover(int duration)

Parameters

duration - the number of seconds to hover. (Default=2)

MethodLongClick ()

Long-clicks in the middle of the AI object. This method is currently not supported for mobile applications. Will be implemented in the future.

C# Syntax

void LongClick( )

MethodRightClick ()

Right-clicks in the middle of the AI object. This method is not supported for mobile applications.

void LongClick( )

MethodSearch (string text)

Types the specified text into the search box and clicks the search icon. This method is supported only for the 'search' AI class.

C# Syntax

void Search (string text)

Parameters

text- the text to search for.

MethodSendKeys

Types the specified string into the AI object.

C# Syntax

void SendKeys (string text)

Parameters

text - The string to type in the AI object.

MethodSendSecureKeys (string encodedText)

Types the specified encoded string into the AI object.

C# Syntax

void SendSecureKeys (string encodedtext)

Parameters

encodedtext - The encoded text to type in the AI object.

  • Generate the encoded value using the Password Encoder utility, available from the UFT Developer menu > Tools menu in your IDE or from the Windows Start menu.

  • Although this method enables you to hide passwords displayed on the screen while running or editing a test, it is not intended to be a secure way to protect password information.

MethodSetState (ToggleState state)

Sets the state of a toggleable AI control. The toggleable AI controls are: Check Box, Toggle Button, and Radio Button.

C# Syntax

void SetState (ToggleState state)

Parameters

state - The state to set.

MethodSetText (string text)

This method is relevant for AIObjects that represent text boxes, input controls, and combo boxes. This method is not supported for mobile applications.

C# Syntax

void SetText (string text)

Parameters

text - The text to set in the control.

MethodSetDescriptionReplaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
MethodVerifyImageExistsChecks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
MethodVerifyImageMatchChecks whether a snapshot of this object and the supplied image are a match, given the specified pixel and RGB tolerance values. (Inherited from HP.LFT.SDK.ITestObject)

Top