Insert step

Prev Next

In addition to recording steps, you can also insert steps into a scenario from the scenario editor. This document explains how to insert steps into a scenario and serves as a reference for each step.

How to insert a step

In the scenario editor:

  1. Hover over the top or bottom of an existing step

  2. Click the + button

  3. Hover over Insert step

A menu will appear with all of the steps that you can insert into your scenario.

Close window

Closes the current browser tab. This step will fail if there is only one window (browser tab) open during test execution.

The browser will not switch back to the previously used window automatically. If you want to continue testing after this step, add a Switch window step after this step.

Dynamic value

Generates a dynamic value for use in other steps such as input steps or text assertions.

Random integer

Generates a random number based on the range of numbers that you provide.

Random string

Generates a random string based on the length and character set that you provide. This set defaults to the lowercase English alphabet, but can include any character — including numbers.

For example, a random string with a length of 10 and a character set of abc123 could generate a3321bc12b .

Two-factor authentication code (TOTP)

Generates a two-factor authentication code using the secret key that you provide.

Today’s date

Generates a string based on the current date during test execution and the following parameters.

Offset days

Sets an offset to add or subtract days from the current date. For example, an offset of 1 generates tomorrow’s date, while an offset of -1 generates yesterday’s date.

Date format

Sets the format of the generated date string. The default date format is YYYY-MM-DD , but you can provide your own format.

The first occurrence of the following character sets are used for dates.

Formatter

Output

YYYY

4-digit year. 2025

YY

Last 2 digits of the year. 25

MM

2-digit month. 04

M

1-digit month when possible. Otherwise, 2-digit month. 4, 12

DD

2-digit day. 01

D

1-digit day when possible. Otherwise, 2-digit day. 1, 30

You can use any character(s) as separators, or omit the separator altogether.

The date formatter is very powerful and can be used in many ways. For example, the format YYYYMMDD_myfile.txt could be used to generate text to assert against dynamic filenames.

Javascript step

Executes custom JavaScript code as if it were executed from the browser’s console. This allows you to perform operations beyond the default actions provided by Autify Nexus.

Navigate step

Navigates to the specified URL. Subsequent steps will be executed on the page navigated to.

New window

Opens a new tab in the browser. Subsequent steps will be executed in the newly opened window.

This step does not navigate to a new web page. Use a Navigate step after this step to specify the URL to visit.

Playwright code step

Executes Playwright code written in JavaScript. This allows you to perform Playwright actions and assertions beyond the defaults provided by Autify Nexus.

Shared group step

Insert a shared group step into your scenario. Clicking this option will bring up a prompt displaying all shared group steps and the number of scenarios using them. You can insert multiple references to the same shared group in your scenario.

For more information about shared group steps, see Shared group steps.

Sleep step

Pauses test execution for a specified number of seconds.

This step is useful to put between steps that cause a slow state change on your website or web application. For example, a sleep step can be used to wait until a page has fully transitioned from a logged out to a logged in state before continuing test execution.

Switch window

Finds a browser window (active tab in the browser) based on a certain criteria and switches to it. Subsequent steps will be executed on the page in the window that was switched to.

There are multiple ways to find a browser window.

Find By

Description

URL

Finds a window by its URL using similar mechanics to text assertions

Title

Finds a window by its page title using similar mechanics to text assertions

Index

Finds a window by its tab position from left to right, where 0 is the leftmost window

Previous window

Choose a window from other windows opened in the scenario before this step