This feature is only available for certain licenses and plans.
Importing and exporting scenarios is simple, yet powerful in Autify Nexus. It helps you save time, supports code-based workflows, and allows for easier sharing and collaboration across teams — especially between developers and QA engineers — to review, edit and manage scenarios together.
Importing a scenario
You can import a scenario using either a previously-exported Autify Nexus scenario file or a Playwright code file.
To import a scenario:
Navigate to the Scenario window
Click the Import button at the top-right of the screen
Select the file that you want to import
Importing an Autify Nexus scenario
You can import a previously-exported Autify Nexus scenario that has the extension .autifyscenario
.
Importing Playwright code
You can import any Playwright code written in JavaScript, including Playwright code that was exported from an Autify Nexus scenario. The code must be saved as a .js
file.
Each test block (test(...)
) in the Playwright code will be converted into a separate scenario in Autify Nexus. Playwright code that cannot be translated directly into an Autify Nexus step will be added as a generic Playwright step in the scenario.
For example, importing the following code will generate two individual scenarios in Autify Nexus — one for test('has title')
and another for test(‘get started link’)
.
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});
test('get started link', async ({ page }) => {
await page.goto('https://playwright.dev/');
// Click the get started link.
await page.getByRole('link', { name: 'Get started' }).click();
// Expects page to have a heading with the name of Installation.
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
});
Exporting a scenario
You can export recorded scenarios as either a native .autifyscenario
file or Playwright code file written in JavaScript and saved as a .js
file.
To export a scenario:
Navigate to the Scenario window
Open a scenario by clicking its name
Click the Export button at the top-right of the screen
Choose the appropriate file type
Follow the dialog prompt and click Export to create your file