Skip to main content
🚀 See how 20+ AI Agents can make your QA faster and smarter. Join 10k+ QAs at global leadership summit! Register Now
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Automate dynamic workflows with AI interactions

Use natural language to perform dynamic actions and validations on your website.

Low Code Automation offers AI Interactions, a feature that lets you generate test steps using natural language prompts based on your website’s current state. Unlike traditional fixed steps that may break when your website changes, AI-generated steps dynamically adapt to the context during each test run.

For example, if you’re testing a flight booking flow and need to select today’s date, a fixed date selector might fail when the test is run on a different day. With AI Interactions, you can simply prompt: “Select today’s date for departure”, and the correct date will be automatically selected every time the test runs.

Example Use Cases:

  • Enter any available date in the next month for departure and return dates: AI analyses the page, finds the next month, and selects any available date accordingly.
  • Ensure terms and conditions are mentioned in English: The AI verifies that the terms are in English, based on the current page.
  • Add to cart the first product from the search results having price greater than $20: The AI analyses the search results, identifies products priced over $20, and adds the first one to the cart.
  • Validate search results are sorted in ascending order of price: The AI verifies the current page to confirm that the terms and conditions are written in English.

Generate dynamic test steps with AI interactions

The AI interactions feature is currently not supported for mobile browser tests.

  1. In the Low Code Automation recorder, go to the step where you want to generate an interaction, then click AI interactions.
    Click AI interactions
  2. Enter your prompt in the AI interactions text box. You can use natural language to describe any action or validation you want to perform. For example: “Select today’s date for departure” or “Verify that the terms and conditions are in English.” AI Interaction text box
  3. Click ✨Perform to execute the action or validation. While the step is being performed, you can view the AI thoughts to understand what the AI is doing. If a test step fails due to the prompt, review these thoughts to refine your prompt accordingly. View AI thoughts
  4. Click Save recording when you are done.

Use the thumbs up or thumbs down buttons to share your feedback. Your input helps us improve and refine the AI prompts for better performance.

Best practices for writing AI prompts

To get the best results from AI Interactions, keep these tips in mind:

Describe your goal, not just the clicks

  • Instead of writing prompt like below:
    1. Click on username input
    2. Enter random@example.com email
    3. Click on Password input
    4. Enter Password123
    5. Click on login
  • Mention the objective in clear words like below::
    Log in using the username 'random@example.com' and password 'Password123'.

Use text you can see on the screen

The AI uses on-screen text and visual cues to find elements.

  • Bad prompt:
    Click on product with data-test-id=”iPhone 16” and add to cart.

  • Good prompt:
    Select the product iPhone 16 and add to cart.
    OR
    Select the first red iPhone 16 and add to cart.

Be specific and avoid vague requests

  • Bad prompt:
    Test the login page.

  • Specific prompt:
    Verify that an error message 'Incorrect password' appears when I try to log in with 'user@example.com' and 'wrongpass'.

The more detail you give, the more accurately AI can perform your task.

Keep prompts focused on a single task

Don’t try to test your entire page in one prompt. Break down complex goals into smaller, manageable steps.

  • Instead of specifying longer objective in single step like below:
    Sign in with credentials “email” and password “password”, add the first product to the cart and validate successful checkout

  • Break it down into smaller achievable objectives like below:

    1. Sign in with credentials “email” and password “password”
    2. Add the first product to the cart
    3. Fill in checkout details with card number = 4242424242424242 and any CVV and valid date in future
    4. Verify that a successful checkout message is displayed on the page

When to use AI interactions vs. the manual recorder

  • Recorder:
    • Recorder is built with powerful inbuilt features like making database calls, API calls, loops, etc.
    • Use recorder for any simple, static workflow automations that does not require any change if the application changes. For eg: login in to webpage, filling out static forms, etc
  • AI Interactions: The test step recorded has to adapt to the application changes. For example:
    • Selecting dynamic date inputs
    • Validating results are sorted in ascending order
    • Select a product with 5-star rating
    • Fill only mandatory fields in a dynamic form
    • Validating page content is in English
    • Add any red colored iPhone to the cart

Supported actions for AI interactions

AI interactions support the following types of user actions:

  • Click
  • Text input
  • Hover
  • Scroll up
  • Scroll down
  • Extract value from UI

Unsupported actions for AI interactions

AI interactions do not support the following types of user actions:

  • Non functional actions/validations that involve accessibility, security, load & performance testing scenarios
  • Any step that involves validating beyond browser application UI [Network logs, console logs, DOM elements, etc, browser navigations]
  • Any language code in prompts

Import variables in AI interactions

You can import variables directly into your AI step prompts to reuse values and make your tests more dynamic. This allows you to reference global variables, test dataset values, or other test variables in your prompt.

Imported variables can be used in your prompt to dynamically generate actions or validations based on the variable’s value. This is especially useful for:

  • Running the same test with different data sets
  • Referencing values extracted from previous steps
  • Making your AI interactions more flexible and maintainable

To use a variable in AI Interactions:

  1. In the AI interactions prompt box, type @ to view available variables. Alternatively, click the + icon below the prompt box and choose the variable you want to import. Type @ to view available variables
  2. Select from global variables, test dataset values, or other test variables.
  3. Reference a variable in your prompt. For example:
    Open the Wikipedia page for @Topic and verify the first paragraph contains @expectedText
    This prompt uses the values of the Topic and expectedText variables during test execution, allowing you to validate different Wikipedia pages and their content dynamically. Screenshot showing how to add variables in a sample prompt

Currently, Secrets are not supported within AI interaction prompts.

For more details about creating and using variables and global variables, see Variables and Global variables.

Edit AI steps

You can edit the step by modifying the prompt even after execution. Click the Edit icon next to the AI interaction to update the prompt and regenerate the step. Edit AI prompts

The prompt window appears. You can edit the existing prompt or enter a new one.

Replay AI steps

The image shows a validation and action step executed through AI interaction. Each time the step runs during replay, it uses AI based on the provided prompt. You can expand the View AI thoughts button to see how the AI analyzed and decided how to execute the step.

Screenshot of execution of AI interactions

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle