Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document installApp #68

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions api-reference/commands/installApp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# installApp
The `installApp` command installs an application on a device, ensuring that the specific version of the app you want to test is correctly deployed. This command is crucial when you need to verify that a particular build or configuration of an app behaves as expected on the device.

```
- installApp: "path/to/app.apk"
```
For Android, this command performs the equivalent of running the following command in the terminal:

```
adb install "path/to/app.apk"
```

For iOS, it performs the equivalent of running the following command:

```
xcrun simctl install booted "path/to/app.ipa"
```

# Example of Using installApp
Below is an example of how to use the installApp command within a Maestro flow. In this scenario, the app is first installed, and then a series of actions are performed to verify the app's behavior:

```
appId: com.example
---
- installApp: "path/to/app.apk"
- launchApp
- tapOn:
id: "com.example:id/start_button"
- assertVisible:
id: "com.example:id/home_screen"
text: "Welcome to Example App"
enabled: true
- stopApp
```