Skip to main content

Supported AI Actions

Ines avatar
Written by Ines
Updated over a month ago

Supported AI Test Actions

This document is a reference for all the specific actions the Thunders chat assistant can generate. When you give the assistant a command in the chat, it converts your request into one or more of these actions to build your test steps.

Understanding these actions can help you write more precise prompts and get the exact steps you need.

The Core Actions

These are the most common and fundamental actions that form the building blocks of your test steps.

Action

Description

When to Use It

Example Prompt

Click

Clicks on a specific element on the page. This is a common action for most interactions.

When you want to click a button, link, checkbox, or any interactive element.

"Click the 'Login' button." or "Tick the 'Remember Me' checkbox."

Input

Types text into a form field or text area.

When you need to enter a value into an input field.

"Enter '[email protected]' into the email field."

Navigate

Directs the browser to a specific URL.

When you want to go to a new page by entering a URL.

"Go to https://example.com/dashboard."

Validate

Checks to see if an element or condition is true on the page.

When you want to verify that something is correct, like checking if text is present or if an element is visible.

"Verify that the text ‘Saved Successfully’ is displayed."

Mouse Actions

These actions are for more advanced mouse interactions beyond a simple click.

Action

Description

When to Use It

Example Prompt

Double Click

Performs a double-click on an element.

When a user needs to double-click on an element to trigger an event, like opening a file.

"Double-click the file icon."

Right Click

Performs a right-click on an element, often used to open a context menu.

When you need to interact with a context menu or trigger a right-click-specific action.

"Right-click the 'Settings' link to open the menu."

Middle Click

Performs a middle-click (mouse wheel click) on an element.

When you need to perform an action typically associated with a middle click, like opening a link in a new tab.

"Middle-click the 'Read more' button to open the article in a new tab."

Control & State Actions

These actions are for managing the flow and state of your test scenario.

Action

Description

When to Use It

Example Prompt

Pause

Pauses the test for a specific number of seconds.

Only when the prompt explicitly mentions waiting for a specific duration. The assistant will not guess or invent a pause time.

"Pause for 5 seconds to let the data load."

Wait

Waits for a specific element to appear, load, or change its state.

When your test needs to wait for an element to become ready before moving to the next step.

"Wait for the 'Checkout' button to be visible."

Scroll

Scrolls the page, either to bring a specific element into view or by a specific number of pixels.

When an element is not visible on the screen and you need to scroll to it.

"Scroll down 500 pixels" or "Scroll the 'Products' list to show the 'Laptop' item."

Press

Simulates a keyboard key press on an element.

When your test needs to press a specific key like 'Enter', 'Tab', or 'Escape'. The key name must be a valid Playwright key.

"After typing the name, press 'Enter' on the keyboard."

Select

Selects an option from a dropdown menu.

When you need to choose an option from a standard HTML select element. Note that custom dropdowns might require two clicks instead.

"In the 'country' dropdown, select 'United States'." or ”Click the country dropdown, then select ‘France’”

Hover

Hovers the mouse cursor over an element.

When an element, like a dropdown menu, only becomes visible or active when you hover over it.

"Hover over the 'Profile' menu to show the sub-options."

Drag & Drop

Drags an element and drops it onto another element.

For drag-and-drop interactions.

"Drag the 'product_A' card to the 'shopping_cart' icon."

Data & Variable Actions

These actions handle the generation, extraction, and use of data within your test.

Action

Description

When to Use It

Example Prompt

Generate

Creates a new variable with a generated value (e.g., a random email address or a specific pattern).

When you need to create unique test data on the fly.

"Generate a random email address and store it in a variable called [USER_EMAIL]."

Extract Web

Extracts a value, text, or attribute from an element on the screen and stores it in a variable.

When you need to capture a value from the webpage to use later in the test.

"Extract the title of the first blog post and save it as [BLOG_TITLE]."

Extract API

Extracts a value from a recent API response.

When you need to pull specific data from an API call to use in a subsequent step.

"Extract the 'user_id' from the last API response and save it as [API_USER_ID]."

Upload

Handles file uploads.

When your test scenario requires uploading a file to the page.

"Upload the file 'document.pdf'."

Best Practices

Just like the main chat guide, being clear and specific is key. When using these actions, remember to:

  • Specify Targets: Clearly state the element you're interacting with. For example, say "Click the 'Submit' button" instead of just "Click."

  • Use Precise Language: The assistant is listening for keywords. Use terms like "wait," "pause," "drag," and "extract" to guide it toward the right action.

  • Reference Variables: When creating or using a variable, always use the square bracket syntax, like [MY_VARIABLE_NAME], to ensure the assistant recognizes it.

Did this answer your question?