Ask AI
Skip to main content

Get text on text element

Function: Get text on text element

This action allows your application to read and retrieve the text displayed within a specific text component on your screen. For instance, if you have a label showing a user's name or a text box with a product description, this action can grab that text so you can use it in other parts of your application, like saving it, displaying it elsewhere, or using it in a condition.

Input

  • Element (Type: UI Element, Subtype: Text): This is the specific text component (like a label, text field, or display area) on your application's interface from which you want to extract the text. You must select an existing text element from your application's design.

Output

  • Result (Type: Text): This is where the action will store the text it finds within the specified "Element". After the action runs, this variable will hold the actual text content that was displayed on your screen.

Execution Flow

Real-Life Examples

Example 1: Capturing a Welcome Message

  • Scenario: Your application displays a personalized welcome message like "Hello, [User's Name]!" on the dashboard. You want to capture this full message to log it or display it in a notification.
  • Inputs:
    • Element: WelcomeMessageLabel (a UI element on your dashboard displaying the welcome text)
  • Result: The Result variable will contain the text "Hello, John Doe!".

Example 2: Retrieving a Product Description

  • Scenario: On a product detail page, there's a text area showing a detailed description of the product. You need to get this description to send it to a reporting tool or to allow the user to copy it easily.
  • Inputs:
    • Element: ProductDescriptionTextArea (a UI element on the product page displaying the description)
  • Result: The Result variable will contain the full product description, e.g., "This is a high-quality, durable smartphone with advanced camera features and a long-lasting battery."

Example 3: Checking a Status Message

  • Scenario: After a user submits a form, a small text label appears, indicating "Submission Successful" or "Error: Invalid Input". You want to read this message to trigger different follow-up actions based on the status.
  • Inputs:
    • Element: StatusMessageLabel (a UI element that displays the submission status)
  • Result: If the submission was successful, the Result variable will contain "Submission Successful". If there was an error, it might contain "Error: Invalid Input".