Exporting browser tests

Exporting browser tests from the mabl CLI

In the mabl CLI, you can export your browser tests using the mabl tests export command. This command is useful when you need to share mabl browser tests with other teams that use a different testing framework, in particular Selenium (Selenium IDE format) or Playwright (TypeScript), and helps enable wider collaboration among teams.

Read on to learn more about working with the mabl tests export command.

📘

CLI documentation

To display CLI documentation for the mabl tests export command, run mabl tests export -h or mabl tests export -- help

mabl tests export

When you run the mabl tests export command, the mabl CLI exports a mabl browser test in a specified file format and outputs the name of the exported file.

Options

OptionDetails
--format, -fSpecify a format for the test export. The default is "yaml". Other choices include "json", "csv", "playwright", and "side" (Selenium IDE).
--mabl-branchIndicate which branch of the test to export.
--environment-id, -eFor tests exported as a Playwright test, generate selectors based on the find information learned in this environment.
--fileExport to a specific file. By default, this command exports to the present working directory. When this option is not used, the exported file name uses the test_id.

Examples

# Export a test as a .side file
$ mabl tests export <test-id> –-format side

# Export a test from the "dev" environment to Playwright 
$ mabl tests export <test-id> –-format playwright –-environment-id <environment-id>

Limitations

The mabl tests export command only exports user-generated browser tests.

  • Tests that are generated by mabl, including the visit home page, link crawler, and visual smoke tests, are not supported.
  • You may export API tests to Postman using the steps outlined in this guide.

The following step types are not currently supported in tests exported to Selenium or Playwright:

Mabl tests that are exported to Selenium do not support conditional steps.

If any of the unsupported step types are important to your team, please let us know in the mabl Product portal.