# Supported Actions

Finalrun supports a comprehensive set of actions for mobile app testing. Write test steps in plain English –– the AI interprets and executes them on the device.

***

## User Interactions

### Tap

Taps on a visible element on the screen.

**Examples:**

```
Tap the "Login" button
Tap the profile icon in the top-right corner
Tap the first item in the products list
Tap the plus icon 3 times
Tap on the screen at 50%, 20%
```

***

### Long Press

Press and hold on an element to trigger context menus or special actions.

**Examples:**

```
Long press the message to open options menu
Long press the app icon on the home screen
Hold down on the list item
```

***

### Input Text

Types text into input fields.

**Examples:**

```
Enter "john.doe@example.com" in the email field
Input text "SecurePass123" into the password field
Type "iPhone 15" into the search bar
```

{% hint style="warning" %}
Always use text input commands for entering text. Do not attempt to tap individual keyboard keys.
{% endhint %}

***

### Scroll / Swipe

Navigate content vertically or horizontally.

**Directions:**

* `up` / `swipe up` – See content below (scroll down)
* `down` / `swipe down` – See content above (scroll up)
* `left` / `swipe left` – See content on the right
* `right` / `swipe right` – See content on the left

**Examples:**

```
Scroll down
Swipe up to view more products
Scroll down until I see the "Submit" button
Swipe left on the image carousel
Swipe down to refresh the feed
```

***

### Keyboard Actions

**Enter / Return:**

```
Press enter to submit
Press the return key
Hit enter to search
```

**Hide Keyboard (Android only):**

```
Hide the keyboard
Dismiss the keyboard
```

***

## Navigation Actions

### Navigate Home

Returns to the device's home screen.

```
Navigate to home screen
Press the home button
Go to the home screen
```

***

### Navigate Back

Goes back to the previous screen.

{% hint style="info" %}
**Platform note:** This is Android-only. On iOS, use "Tap the back button" instead.
{% endhint %}

```
Navigate back to the previous screen
Go back
Press the back button
```

***

## App Control Actions

### Launch App

Launches an application or brings a backgrounded app to foreground. Your app is auto-launched at test start, so use this for:

* Switching to other apps (Settings, Camera, etc.)
* Bringing app back from background
* Testing with specific permissions or state

**Basic examples:**

```
Launch the Settings app
Launch the Camera app
Launch MyApp
```

**With permissions:**

```
Launch MyApp with camera permission
Launch MyApp with location and notifications permissions
Launch the app with no permissions
```

**With app state:**

```
Launch the app with a fresh start
Launch MyApp without reinstalling
Restart the app
```

***

### Stop App

Force stops the current application.

```
Stop the app
Force close MyApp
```

***

### Wait

Pauses execution for a specified duration.

**Examples:**

```
Wait for 3 seconds
Wait 5 seconds for the screen to load
Wait for 10 seconds
```

{% hint style="info" %}
Use 3 seconds for quick UI updates, 5-10 seconds for network operations.
{% endhint %}

***

## Device Control Actions

### Set Location

Sets the device's GPS coordinates for location-based testing.

**Examples:**

```
Set location to New York City
Set location to coordinates 40.7128, -74.0060
Change location to San Francisco
Set GPS to London, UK
```

***

### Deep Link

Opens a specific URL or deep link directly in your app.

**Examples:**

```
Open deep link "myapp://products/123"
Navigate to URL "https://example.com/special-offer"
Open the deep link "myapp://settings/profile"
```

***

### Rotate Device

Changes the device's screen orientation.

```
Rotate the device to landscape
Switch to portrait orientation
```

***

### Airplane Mode (Android only)

```
Turn on airplane mode
Disable airplane mode
```

***

### Toggle Internet (Android only)

```
Turn off the internet
Enable WiFi
Disable mobile data
```

***

## Verification Actions

Verification steps confirm your app behaves as expected.

**Examples:**

```
Verify the success message displays "Account created successfully"
Verify the cart count shows "3"
Verify the profile name displays "John Doe"
Verify the toggle switch is enabled
Verify the error message "Invalid email" is displayed
Verify the home screen displays
```

**What gets verified:**

* Text content and labels
* Element visibility
* List item counts
* UI state (enabled/disabled, checked/unchecked)
* Error messages and alerts
* Navigation results

***
