Interface IAIObject
An object identified using Artificial intelligence.
Inherited Members
Namespace: HP.LFT.SDK.AI
Assembly: HP.LFT.SDK.dll
Syntax
public interface IAIObject : ITestObject, ITestObjectDescriber
Properties
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.
Declaration
string Value { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Click()
Clicks in the middle of the AI object.
Declaration
void Click()
DoubleClick()
Double-clicks in the middle of the AI object. This method is not supported for mobile applications.
Declaration
void DoubleClick()
Hover()
Holds the cursor over an AI object. This method is not supported for mobile applications.
Declaration
void Hover()
Hover(int)
Holds the cursor over an AI object for a given duration. This method is not supported for mobile applications.
Declaration
void Hover(int duration)
Parameters
| Type | Name | Description |
|---|---|---|
| int | duration | The duration to hover. |
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.
Declaration
void LongClick()
RightClick()
Right-clicks in the middle of the AI object. This method is not supported for mobile applications.
Declaration
void RightClick()
Search(string)
Types the specified text into the search box and clicks the search icon. This method is supported only for the 'search' AI class.
Declaration
void Search(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text to search for. |
Select(string)
Selects an item from a combo box.
Declaration
void Select(string element)
Parameters
| Type | Name | Description |
|---|---|---|
| string | 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 default.
Declaration
void Select(string element, AIComboBoxSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| string | element | The item to select. |
| AIComboBoxSettings | settings | The settings to use for the select. |
SendKeys(string)
Types the specified string into the AI object.
Declaration
void SendKeys(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The string to type in the AI object. |
SendSecureKeys(string)
Types the specified encoded string into the AI object.
Declaration
void SendSecureKeys(string encodedText)
Parameters
| Type | Name | Description |
|---|---|---|
| string | encodedText | The encoded text to type in the AI object. |
SetState(ToggleState)
Sets the state of a toggleable AI control. The toggleable AI controls are: Check Box, Toggle Button and Radio Button
Declaration
void SetState(ToggleState state)
Parameters
| Type | Name | Description |
|---|---|---|
| ToggleState | state | The state to set. |
SetText(string)
This method is relevant for AIObjects that represent text boxes, input controls, and combo boxes. This method is not supported for mobile applications.
Declaration
void SetText(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The input to set. |