With direct editing, you can give your AI coding agent the tools it needs to update mabl tests without opening your application. This article explains when direct editing is the right approach and how to work with it.
Before you start
To get set up, install mabl skills in your AI coding agent, such as Claude Code, Cursor, or GitHub Copilot. mabl skills connect your AI client to the mabl MCP and add a suite of tools for planning, authoring, coverage design, direct editing, and debugging.
When to use direct editing
Direct editing supports browser, mobile, and API tests. Which tool to reach for depends less on the type of test than on the kind of change: direct editing suits changes your coding agent can name exactly, while the mabl agent suits more complex, intent-based tasks that involve interacting with the application under test.
Changes you can name exactly
Direct editing is a good fit for:
- Updating an assertion value or expected text
- Adding or updating a find step that uses a Playwright, CSS, or XPath locator
- Extracting a variable from a known source, such as a URL, an API response field, or an element the code change added
- Creating a step group in browser and mobile tests, or removing and reordering steps
- Converting steps into a reusable flow, finding that sequence in other tests, and swapping it out
- Repeating a change the mabl agent already made elsewhere, once you've confirmed it's correct
In mobile tests, direct editing is limited to structural changes. It can't change what a step targets on screen, such as updating a selector or extracting a variable from an element.
Changes that need the running application
Use the mabl agent instead when your changes depend on running the application, or on third-party markup that isn't in your codebase:
- Authoring against an application your coding agent hasn't seen
- Finding a selector that isn't obvious from the code
- Anything involving dynamic content, iframes, webviews, shadow DOM, identity providers, or timing
- Repairing a test when you don't yet know what changed
- Exploratory work, where the goal is to find out what the application actually does
The mabl agent works with browser tests only. To change a mobile test in a way that depends on running the app, use the mabl Trainer.
Use both agents together
The mabl agent knows your application and your coding agent knows your code. Many changes are best made with both. If you make a change once with the mabl agent against your real application, you can use direct editing to apply that same change everywhere else it's needed.
Making direct edits
When you make a direct edit, your coding agent reads the mabl test's current steps, then writes the change. Changes are applied exactly as described and structurally validated to confirm mabl can read and replay the test. Unlike the mabl agent, which runs the test and reworks any steps that fail, direct editing saves the change without running it.
For best results, treat direct edits from your coding agent the same way you'd treat a code change:
- Edit on a branch so the change can be reviewed before it reaches your default branch.
- Run the test to validate the change works before merging it to master.
For example:
"On a new branch called order-update-text, update the confirmation assertion in the checkout test to expect 'Thanks for your order'."