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, runmabl tests export -h
ormabl tests export -- help
mabl tests export
Export a mabl browser test in a specified file format.
$ `mabl tests export <test_id> <optional_arguments>`
Optional arguments
Option | Details |
---|---|
--format , -f | Specify a format for the test export. The default is "yaml". Other choices include "json", "csv", "playwright", and "side" (Selenium IDE). |
--mabl-branch | Indicate which branch of the test to export. |
--environment-id , -e | For tests exported as a Playwright test, generate selectors based on the find information learned in this environment. |
--file | Export 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. |
Output
When you run the mabl tests export
command, the mabl CLI outputs the name of the exported file.
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:
- Select steps
- Drag and drop steps
- JavaScript snippets
- API steps
- Interactions with Cookies
- File uploads
- Download assertions
- Accessibility checks
- MFA authenticator steps
- Email testing
- PDF testing
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.
Updated 2 months ago