com.hp.lft.sdk.ai

Interface AiObject

    • Method Detail

      • doubleClick

        UFT Developer 23.4 and later.

        void doubleClick()
                  throws GeneralLeanFtException
        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

        UFT Developer 23.4 and later.

        void longClick()
                throws GeneralLeanFtException
        Long-clicks in the middle of the AI object. This method is not supported for mobile applications.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • rightClick

        UFT Developer 23.4 and later.

        void rightClick()
                 throws GeneralLeanFtException
        Right-clicks in the middle of the AI object. This method is not supported for mobile applications.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • search

        void search(String text)
             throws GeneralLeanFtException
        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

        void sendSecureKeys(String encodedText)
                     throws GeneralLeanFtException
        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

        void setState(ToggleState state)
               throws GeneralLeanFtException
        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

        UFT Developer 23.4 and later.

        void setText(String text)
              throws GeneralLeanFtException
        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

        UFT Developer 2021 R1 and later.

        String getValue()
                 throws GeneralLeanFtException
        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

        UFT Developer 23.4 and later.

        void hover()
            throws GeneralLeanFtException
        Holds the cursor over an AI object. This method is not supported for mobile applications.
        Throws:
        GeneralLeanFtException - if error occurs during execution
      • hover

        UFT Developer 23.4 and later.

        void hover(int duration)
            throws GeneralLeanFtException
        Holds the cursor over an AI object for a given duration. This method is not supported for mobile applications.
        Throws:
        GeneralLeanFtException - if error occurs during execution