Create Steps using AI (Beta)

Generate Steps using AI (Beta)

FinalRun supports a variety of actions that can be easily performed by writing user prompts. You can interact with UI elements, control device settings, manage test data, and even leverage advanced AI-powered validations and extractions.

Action Directory

1. Tap

Interact with buttons, links, and other clickable elements.

  • Simple Tap: "Tap the 'Continue' button"

  • Repeated Taps: "Tap the plus icon 3 times"

  • Tapping by Position: "Tap on the screen at 50%, 20%"

2. Long Press

Simulate holding a finger down on an element.

  • "Long press the image to show options"

  • "Hold down on the list item"

3. Scroll

Navigate vertically or horizontally. Direction is required.

  • Simple Scroll: "Scroll down" or "Swipe up"

  • Scroll Until Element is Visible: "Scroll down until I see the 'Submit Application' button"

  • Horizontal Scroll: "Swipe left on the image carousel"

4. Enter Text

Type into input fields.

  • Target a field: "Enter 'password123' in the password field"

  • Type in focused field: "Type 'hello world'"

5. Hide Keyboard (Android Only)

Dismiss the on-screen keyboard if it is visible.

  • "Hide the keyboard"

  • "Dismiss keyboard"

6. Back (Android Only)

Trigger the device's native back navigation.

  • "Go back"

  • "Press the back button"

7. Home

Navigate to the device's home screen.

  • "Go to the home screen"

8. Rotate

Change the device's screen orientation.

  • "Rotate the device to landscape"

  • "Switch to portrait orientation"

9. Set Airplane Mode (Android Only)

Enable or disable airplane mode on the device.

  • "Turn on airplane mode"

  • "Disable airplane mode"

10. Toggle Internet (Android Only)

Enable or disable the device's internet connection (Wi-Fi and/or cellular).

  • "Turn off the internet"

  • "Enable WiFi"

11. Set Location

Mock the device's GPS location for location-aware testing.

  • "Set the location to latitude 40.7128, longitude -74.0060"

  • "Mock my location to San Francisco"

12. Wait

Pause the test for a specified duration.

  • "Wait for 5 seconds"

  • "Pause for 3000 milliseconds"

13. Deeplink

Open a specific screen or resource within your app directly using its URL scheme.

  • "Open the deeplink 'myapp://products/123'"

  • "Navigate to 'myapp://settings'"

14. Create Variable

Store a value (text, number) in a variable for use in later steps.

  • "Create a variable named 'username' with the value 'testuser123'"

  • "Save 'London' into a variable called 'searchCity'"

15. Make an API Call

Send a request to a server API to set up or verify data.

  • "Make a GET request to 'https://api.example.com/users/1'"

  • "Send a POST request to 'https://api.example.com/login' with a json body {}"

16. AI-Powered Assertions & Extractions

These advanced commands use AI to perform smart validations and data retrieval.

  • Visual Assertion: Intelligently checks if the screen looks visually correct, ignoring minor, non-functional pixel changes. Read more about it here

  • Text Extraction: Reads text from the screen and saves it into a variable. This is perfect for capturing dynamic data like order numbers, confirmation codes, or error messages. Read more about it here

Tips for Best Results

"Scroll" vs. "Swipe"

The AI understands that for mobile devices, a "swipe up" gesture makes the page scroll down. You can use either term, and the AI will perform the correct action.

  • "Scroll down" and "Swipe up" both move the content up the screen.

  • "Scroll up" and "Swipe down" both move the content down the screen.

Dismissing Popups

To close a dialog or popup, simply ask to "dismiss the popup". The AI will first look for a close button (X, "Cancel") and, if none is found, will try tapping outside the modal to close it.

Last updated