Package com.hp.lft.sdk.ai
Interface AiObject
- All Superinterfaces:
TestObject
,TestObjectDescriber
An object identified using Artificial intelligence.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
click()
Clicks in the middle of the AI object.void
Double-clicks in the middle of the AI object.getValue()
Returns the AI object's value.void
hover()
Holds the cursor over an AI object.void
hover
(int duration) Holds the cursor over an AI object for a given duration.void
Long-clicks in the middle of the AI object.void
Right-clicks in the middle of the AI object.void
Types the specified text into the search box and clicks the search icon.void
Selects an item from a combo box.void
select
(String element, AiComboBoxSettings settings) Selects an item from a combo box, using the specified settings.void
Types the specified string into the AI object.void
sendSecureKeys
(String encodedText) Types the specified encoded string into the AI object.void
setState
(ToggleState state) Sets the state of a toggleable AI control.void
This method is relevant for AIObjects that represent text boxes, input controls, and combo boxes.Methods inherited from interface com.hp.lft.sdk.TestObject
callFTMethod, callFTMethod, exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists
Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber
describe
-
Method Details
-
click
Clicks in the middle of the AI object.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
doubleClick
Double-clicks in the middle of the AI object. This method is not supported for mobile applications.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
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.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
rightClick
Right-clicks in the middle of the AI object. This method is not supported for mobile applications.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
sendKeys
Types the specified string into the AI object.- Parameters:
text
- the string to type in the AI object.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
search
Types the specified text into the search box and clicks the search icon. This method is supported only for the 'search' AI class.- Parameters:
text
- the text to search for.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
sendSecureKeys
Types the specified encoded string into the AI object.- Parameters:
encodedText
- the encoded text to type in the AI object.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
setState
Sets the state of a toggleable AI control. The toggleable AI controls are: Check Box, Toggle Button and Radio Button- Parameters:
state
- the state to set.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
setText
This method is relevant for AIObjects that represent text boxes, input controls, and combo boxes. This method is not supported for mobile applications.- Parameters:
text
- the input to set.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
getValue
Returns the AI object's 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.- Returns:
- the AI object's value
- Throws:
GeneralLeanFtException
- if error occurs during execution
-
hover
Holds the cursor over an AI object. This method is not supported for mobile applications.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
hover
Holds the cursor over an AI object for a given duration. This method is not supported for mobile applications.- Parameters:
duration
- The duration value.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
select
Selects an item from a combo box.- Parameters:
element
- The item to select.- Throws:
GeneralLeanFtException
- if error occurs during execution
-
select
Selects an item from a combo box, using the specified settings. After the select operation is finished the settings will be reverted to default.- Parameters:
element
- The item to select.settings
- The settings to use for the select.- Throws:
GeneralLeanFtException
- if error occurs during execution
-