Skip to main content
Experience faster, smarter testing with BrowserStack AI Agents. See what your workflow’s been missing. Explore 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.

The AI interactions feature is currently in Alpha. For more details, contact us.

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.

AI interaction examples

The following are sample use cases that demonstrate how to use AI Interaction.

Supported actions for AI interactions

AI interactions support the following types of user actions:

  • Click
  • Text input
  • Hover
  • Scroll up
  • Scroll down

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

Points to remember

  • AI Interactions is currently in Alpha and supports a maximum of 5 AI-generated steps per test.
  • Use the recorder to create static steps—ideal for parts of your application that don’t change frequently.
  • For dynamic workflows, use AI Interactions for actions and validations that adapt based on the application’s current state.
  • AI Interactions work best for targeted, context-aware actions or validations. Use very specific prompts to generate more precise and accurate steps.
  • Avoid writing prompts that require scanning across multiple pages or achieving large objectives. Instead, break tasks into smaller, focused actions or validations for better accuracy and reliability.
  • Write concise and clear prompts and provide relevant context.

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