launchApp
Launch app in Maestro with appId, clear state/keychain, and launch arguments.
To launch the app under test, simply write:
- launchAppTo launch an arbitrary app with a given id (package name on Android, bundle id on iOS), do:
- launchApp: appIdIf you need to clear the app state before launching the app, specify a clearState flag
- launchApp:
appId: "com.example.app"
clearState: true
clearKeychain: true # optional: clear *entire* iOS keychain
stopApp: false # optional (true by default): stop the app before launching it
permissions: { all: deny } # optional: by default all permissions are allowed,
# even if clearState: true is passedIf you want to test with a permission with a specific value, specify a permissions argument
- launchApp:
permissions:
notifications: unset # notification permission is unset
android.permission.ACCESS_FINE_LOCATION: deny # Android fine location permission is deniedYou can read more about configuring permissions here.
Examples
To launch the app
To launch the app in a clean state
To stop the app
To launch or stop a different app
To bring a backgrounded app to the foreground without restarting it
To restart an already running app
Launch Arguments
You can send launch arguments while launching the app for both iOS and Android.
Sending launch arguments
Arguments allow sending String, Boolean, Double, and Integer. All other data types are by default passed as a String.
Receiving arguments on Android
Receiving arguments on iOS
Receiving arguments in React Native
Receiving arguments in Flutter
Last updated
Was this helpful?
