If you're just getting started in mabl, you can migrate tests from Playwright or Selenium into mabl with the mabl tests import
command.
mabl tests import playwright
The mabl tests import playwright
command imports existing Playwright tests into mabl.
For a step-by-step guide on how to import Playwright tests, click here.
The Playwright import command is an experimental offering. We highly encourage you to provide feedback on this feature in the mabl Product Portal.
Options
Option | Details |
--auto-save | Automatically save tests in mabl when the migration is complete |
--workspace-id | ID of the mabl workspace to import tests to. Use this option if you belong to multiple mabl workspaces. |
--path | Path to the Playwright test that you want to import. The current directory is the default path. |
--project |
Path to the Playwright project that you want to run. This project must have tracing enabled. Mabl converts the baseURL of this Playwright project into the application URL in the imported mabl test(s). |
--grep |
Grep argument to pass to Playwright to filter tests. In Playwright, tag the tests you want to import to mabl. For example, if you add a "mabl" tag to a Playwright test, you can run the --grep flag with "mabl" |
--extra-arguments | Extra arguments that you can pass to Playwright, such as running in headless mode |
--tests-path | Path where tests are located. The default is "tests". |
--trace-file | Path of a single Playwright trace.zip file to import |
--trace-path | Path of the directory containing Playwright trace files to import |
Examples
# Import the Playwright test in current directory
mabl tests import playwright --project chromium
# Import Playwright tests that have a "mabl" tag
mabl tests import playwright --project chromium --grep "mabl"
Note the following limitations for imported Playwright tests:
- Variables, code blocks, if statements, and loops are not migrated during the import session.
- All steps that interact with page elements are converted into custom find steps in mabl. Custom find steps are less resilient than steps recorded in the mabl Trainer because they cannot use Configure Find, auto-heal, or Intelligent Wait.
- Mabl tests do not support Playwright’s array assertions or assertions that use regular expressions.
mabl tests import selenium
The mabl tests import selenium
command imports existing Selenium tests into mabl.
For a step-by-step guide on how to import Selenium tests, click here.
Options
Option | Details |
--auto-save | Automatically save tests in mabl when the migration is complete |
--multi | Import multiple tests at once |
--name, -n | The name to give this test in mabl |
--port | The port on which the Selenium proxy should listen. The default is 8889. |
--workspace-id, -w | ID of the mabl workspace to import tests to. Use this option if you belong to multiple mabl workspaces. |
Examples
# Import a test and name it "My imported test"
mabl tests import selenium --name "My imported test"
# Import multiple tests at once
mabl tests import selenium --multi
The following Selenium actions are not migrated during the import session:
- Assertions
- Variables
- File downloads
- File uploads
- Drag and drop actions
- Conditional logic
- Loop logic
- Steps that interact with elements in an iframe
- Hover actions
- Cookies