--- title: "Insert step" slug: "insert-step" updated: 2025-04-25T02:11:56Z published: 2025-04-25T02:11:56Z canonical: "helpcenter.autify.com/insert-step" --- > ## Documentation Index > Fetch the complete documentation index at: https://helpcenter.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Insert step 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. ![](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image(116).png?sv=2026-02-06&spr=https&st=2026-11-08T16%3A26%3A06Z&se=2026-11-08T17%3A26%3A06Z&sr=c&sp=r&sig=rUqcQyqwIpiWyU1PbudBd3RAPiuUb%2FXz0CIDF%2Bw%2BcC0%3D) ## 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](/v1/docs/insert-step#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](/v1/docs/insert-step#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](/v1/docs/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](/v1/docs/text-assertions) | | Title | Finds a window by its page title using similar mechanics to [text assertions](/v1/docs/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 |