When you’re manually creating or editing a browser test in the mabl Trainer, you don’t have to train every step yourself. At any point, you can hand off to the mabl agent: switch to agent mode, describe what you need in natural language, and the agent generates the steps for you. When it’s done, switch back to manual training and keep working. Agent mode is useful when you want to retrain a sequence of steps that has drifted or let the agent author routine parts of a test.
To generate an entire test from a description without opening the Trainer, see Agentic test authoring for web apps instead.
Generate steps with the agent
To add or retrain a set of steps, click on the Generate button to build steps from a natural language prompt. This works in both new and existing browser tests.
Before you generate, make sure your app is in the correct state. The agent generates steps at the cursor and uses the steps located before it as context. It has no awareness of steps located after the cursor.
- To add new steps, position the Trainer cursor where you want the steps to be added.
- To regenerate steps for an existing task, place the cursor just below the task description step.
Click the Generate button to open the prompt modal, describe what your test needs, and click Generate steps. The agent uses your prompt, a screenshot of the app, the task plan, and the page’s HTML/DOM structure to generate one or more steps, bundling them into step groups as it works.
What can the agent do?
For a complete list of supported and unsupported interactions, click here.
Track what the agent is doing
To review the agent's decisions, click the clock icon to open the agent activity view. To learn more about how the agent works, review Understanding agent activity.
Keep the agent on track
While the agent builds the test, avoid interacting with the browser window—doing so can put the agent into an unexpected state.
Avoid interacting with the browser window while the agent is generating test steps
If the agent appears to be getting off track, pause it and try one of the following:
- Edit the task plan - if the agent appears stuck or is repeating actions, it may be because the expected change wasn’t detected. In this case, pause the agent and refine the task plan. When you restart the agent, it updates the plan based on the edited prompt and any existing steps located before the cursor. As with generating steps, it has no awareness of steps located after the cursor.
- Train steps manually - in ambiguous situations, the agent may get off track if it doesn’t know enough about your app to make good decisions. If this happens, switch to manual mode to add tasks and steps yourself.
Agentic test authoring supports most common UI interactions, including filling out forms, selecting from date pickers and dropdowns, and clicking on elements. If the task plan includes unsupported interactions, the agent may prompt you to take over training.
Switch back to manual training
You can switch back to manual mode at any point to train steps yourself. Agent mode and manual training interleave, so you can move between them as much as you need while building a test.
The Trainer in manual mode