version: 5.7.7
session: 682f5aab811bd5a322c0e5a1
steps:
  - prompt: click on sign in
    commands:
      - command: focus-application
        name: Google Chrome
      - command: hover-text
        text: Sign In
        description: black button below the password field
        action: click
      - command: assert
        expect: an error shows that fields are required

Description

The hover-text command is used to locate text on the screen based on a description and perform an action on it. This can include hovering, clicking, right-clicking, or double-clicking the text.

Arguments

ArgumentTypeDescription
textstringThe text to find on the screen. Longer and unique is better.
descriptionstringA description of the text and what it represents. The actual text itself shouldn’t be included here.
actionstringThe action to take when the text is found. Available actions are: click, right-click, double-click, hover.
methodenumThe matching algorithm to use. Possible values are turbo (default) and ai.

Example usage

command: hover-text
text: Sign Up
description: link in the header
action: click

Protips

  • Use unique and specific text to improve detection accuracy.
  • Choose the appropriate method for your use case:
    • turbo: Faster and more efficient for most scenarios.
    • ai: More robust for complex or ambiguous text matching.
  • Ensure the action specified matches the intended interaction with the text.

Gotchas

  • If the text can’t be located, the command will fail. Ensure the text is visible on the screen and matches exactly.
  • Variations in font size, style, or screen resolution may affect detection accuracy.

Notes

  • The hover-text command is ideal for interacting with textual elements that can’t be identified using other selectors.
  • Supported actions allow flexibility in how the text is interacted with during the test.