added

Export mabl tests to Playwright

Starting with version 1.50, the mabl CLI supports exporting browser tests to Playwright! With this change, the mabl tests export command now exports tests in the following formats:

  • Playwright format (TypeScript)
  • Selenium IDE format (.side format)
  • YAML
  • JSON
  • CSV

The mabl tests export command is useful if you need to share mabl tests with a teams that use different testing frameworks.

Try it out

Before you start, make sure you're using the most recent version of the mabl CLI. Run mabl -v to check your version. To update the mabl CLI, run this command:

`$ npm i -g @mablhq/mabl-cli

Run the following command to export a mabl browser test in Playwright format:

$ mabl tests export <test-id> –-format playwright –-environment-id <environment-id>

Mabl resource IDs

This command uses two mabl resource IDs: test ID and environment ID.

  • Test ID: the ID of the specific test you want to export.
  • Environment ID: the ID of the environment that the export uses to generate the best selector based on the element history.

Learn more

To learn more about exporting mabl browser tests from the mabl CLI, including options and limitations, check out our documentation.