Share this page

IAIObject Interface
An object identified using Artificial Intelligence.

C# Syntax

    public interface IAIObject : HP.LFT.SDK.ITestObject, HP.LFT.SDK.ITestObjectDescriber

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

| Name | Description
--- | --- | ---
| Value | 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;}
| DisplayName | The object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
| Parent | The 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

| Name | Description
--- | --- | ---
| Click | Clicks in the middle of the AI object. C# Syntax `void` `Click( )`
| DoubleClick | Double-clicks in the middle of the AI object. This method is not supported for mobile applications. C# Syntax `void` `DoubleClick( )`
| Exists | Checks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
| FindChildren<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)
| Describe<TChild> | Creates a child test object of this test object. (Inherited from HP.LFT.SDK.ITestObjectDescriber)
| GetDescription | Returns 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)
| GetSnapshot | Captures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
| GetTextLocations | Returns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
| GetVisibleText | Returns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
| Highlight | Highlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
| HighlightMatches<TChild> | Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
| Hover () | Holds the cursor over an AI object. This method is not supported for mobile applications. C# Syntax `void` `Hover( )`
| Hover(int) | 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)
| LongClick | 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( )`
| RightClick | Right-clicks in the middle of the AI object. This method is not supported for mobile applications. `void` `LongClick( )`
| Search | 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.
| Select (string) | Selects an item from a combo box. C# Syntax `void` `Select (string element)` Parameters element - The item to select.
| Select (string, AIComboBoxSettings) | Selects an item from a combo box, using the specified settings. After the select operation is finished the settings will be reverted to the default. C# Syntax `void` `Select (string element AIComboBoxSettings settings )` Parameters element - The item to select. settings - The settings to use for the Select operation. Note: To set selection settings that remain in effect until the end of the run session, use AIComboBoxSettings.
| SendKeys | Types the specified string into the AI object. C# Syntax `void` `SendKeys (string text)` Parameters text - The string to type in the AI object.
| SendSecureKeys | 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.
| SetState | 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.
| SetText | 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.
| SetDescription | Replaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
| VerifyImageExists | Checks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
| VerifyImageMatch | Checks 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

Tips to improve your search results... OpenText™ Functional Testing for Developers .NET SDK Version: 25.2 OpenText™ Functional Testing for Developers SDK 25.2 All View Local Help Center View Online Help Center Version: