Migrating Playwright tests to mabl is now easier than ever with our new “activate auto-heal” option! Previously, when you imported a test from Playwright, all steps that interacted with page elements were converted into custom find steps in mabl. Now, after you import the test, you have the option to run the test locally in mabl and activate auto-heal.
This option eliminates the time-consuming process of replacing imported custom find steps with recorded actions in the Trainer, so you can reap the full benefits of mabl’s find strategies, including auto-heal, Configure Find, and Intelligent Wait.
Try it out
To try it out, make sure the mabl CLI version on your machine uses version 2.53.0 or higher.
# Check the mabl CLI version mabl -v # Update the mabl CLI to the latest version npm i -g @mablhq/mabl-cli
Run the Playwright import command. At a minimum, provide a path to the Playwright test(s) you want to import.
mabl tests import playwright --path {path-to-playwright-tests}
The mabl CLI runs the Playwright test(s) using the Playwright version installed on your machine. If all the tests pass, the mabl CLI prompts you to choose from one of the following options to finish the import session:
- Discard the test
- Run test to activate auto-heal
- Save the test
- View the test description
Choose "Run test to activate auto-heal." When the test runs locally in mabl, all of the steps with custom selectors are converted into mabl steps with auto-heal enabled.
Learn more
To learn more about migrating Playwright tests to mabl, check out the docs.