What is a JavaScript Step?
A JavaScript Step is a feature that allows you to use custom JavaScript in a test scenario to perform operations and assertions not supported by Autify's standard functionality. For instance, you can use it for cases like:
- Generating dynamic dates or usernames for use in later steps.
- Retrieving one-time passcodes from emails to be entered in a subsequent step.
- Verifying the attribute values of an element.
Additionally, you can use the autify.mobile.getDriver method to access and utilize the Appium library.
JavaScript Steps are currently available as a public beta feature.
For more information on our public beta features, refer to this page.
Adding a JavaScript Step to a scenario
- Open the Scenario Details screen.
- Move your cursor between the steps where you want to insert the JavaScript step.
- Click the + button and select "Insert JavaScript Step" from the menu that appears.

- Enter your JavaScript code in the text editor. The code is wrapped in a function, so you don't need to add the function syntax yourself.

- (Optional) Give the step a name and add a memo to describe its purpose.

- Click "Save" to save the scenario.
Using values obtained or generated from a JavaScript Step in an Input Step
You can use values obtained or generated within a JavaScript Step in subsequent input steps by using a return statement.
- In the Scenario Details screen, click on the step where you want to use the returned value.
- From the input value's dropdown menu, select "Get from another step" and then choose a JavaScript Step with a return value.

- When you run the scenario, you can verify the actual returned value in the test results.

- After creating a JavaScript Step, you must save it at least once before its value becomes available for use in subsequent steps.
- If you do not explicitly return a value within the JavaScript Step, its default return value will be null.
Functions available in JavaScript Steps
Currently, the functions supported in NoCode Mobile are limited. Please check the following list for the available functions.
Points to note
- When verifying and implementing JavaScript Steps, it may sometimes be necessary to check the actual application's code. Please either set up your own development environment or work with your developers to implement the code.
- Please be aware that this feature is designed for customer-side development. Therefore, our Customer Support team is unable to create code on your behalf. We appreciate your understanding.
FAQ
- Can I use it a return value from a JavaScript Step with an Assertion Step?
- No, you cannot currently use a value from a JavaScript step in an Assertion step.
- Can I use arguments?
- No, you cannot currently use arguments in a JavaScript step.
- Can I save frequently used operations as a snippet?
- No, saving snippets is not currently supported.
- Are JavaScript snippets publicly available, like for NoCode Web?
- We do not provide snippets specifically for NoCode Mobile, but some of the snippets for NoCode Web are also compatible.
- Autify JavaScript Snippets

