launchApp
Use this command to start a mobile app.
Examples
Launch the uploaded app
To launch the app you uploaded to Moropo, simply call without options:
Launch a different app
To launch a specific app (no one you've uploaded to Moropo), use the appId
option to supply an iOS Bundle ID or Android Package Name:
Stop the app before launching
The stopApp
option is true
by default. If you set it to false
the test runner won't attempt to close the running app before launch.
Clearing application state during launch
Clearing the keychain during launch (iOS only)
Permissions
Use the permissions option to customise which permissions are accepted, denied or unset by the virtual device being tested. By default, all permissions are allowed.
For example, to disallow every permission:
To unset notifications
and deny camera
:
List of all standard permissions
bluetooth
❌
calendar
camera
contacts
health
❌
❌
homekit
❌
location
medialibrary
microphone
motion
❌
notifications
phone
❌
photos
❌
reminders
❌
siri
❌
sms
❌
speech
❌
storage
❌
usertracking
❌
something.custom
❌
Launching with arguments
Launch arguments are variables that are injected into your app at start-up time. They're useful for triggering certain behaviours inside your app code. For example, telling your app to use a mock API.
Using the arguments option
You can send the following types of data: String
, Integer
, Double
or Boolean
. Data that doesn't match one of these formats will be parsed as a string.
Accessing launch arguments on React Native
In JavaScript
Accessing launch arguments on iOS
Using Swift:
Using Objective C:
Accessing launch arguments on Android
Using Kotlin:
Using Java:
Related Commands
Last updated
Was this helpful?