public interface InteractsWithApps extends ExecutesMethod
Modifier and Type | Method and Description |
---|---|
default void |
activateApp(java.lang.String bundleId)
Activates the given app if it installed, but not running or if it is running in the
background.
|
default void |
activateApp(java.lang.String bundleId,
BaseActivateApplicationOptions options)
Activates the given app if it installed, but not running or if it is running in the
background.
|
default void |
closeApp()
Close the app which was provided in the capabilities at session creation
and quits the session.
|
default void |
installApp(java.lang.String appPath)
Install an app on the mobile device.
|
default void |
installApp(java.lang.String appPath,
BaseInstallApplicationOptions options)
Install an app on the mobile device.
|
default boolean |
isAppInstalled(java.lang.String bundleId)
Checks if an app is installed on the device.
|
default void |
launchApp()
Launches the app, which was provided in the capabilities at session creation,
and (re)starts the session.
|
default ApplicationState |
queryAppState(java.lang.String bundleId)
Queries the state of an application.
|
default boolean |
removeApp(java.lang.String bundleId)
Remove the specified app from the device (uninstall).
|
default boolean |
removeApp(java.lang.String bundleId,
BaseRemoveApplicationOptions options)
Remove the specified app from the device (uninstall).
|
default void |
resetApp()
Resets the currently running app together with the session.
|
default void |
runAppInBackground(java.time.Duration duration)
Runs the current app as a background app for the time
requested.
|
default boolean |
terminateApp(java.lang.String bundleId)
Terminate the particular application if it is running.
|
default boolean |
terminateApp(java.lang.String bundleId,
BaseTerminateApplicationOptions options)
Terminate the particular application if it is running.
|
execute, execute
default void launchApp()
default void installApp(java.lang.String appPath)
appPath
- path to app to install.default void installApp(java.lang.String appPath, @Nullable BaseInstallApplicationOptions options)
appPath
- path to app to install or a remote URL.options
- Set of the corresponding instllation options for
the particular platform.default boolean isAppInstalled(java.lang.String bundleId)
bundleId
- bundleId of the app.default void resetApp()
default void runAppInBackground(java.time.Duration duration)
duration
- The time to run App in background. Minimum time resolution is one seconddefault boolean removeApp(java.lang.String bundleId)
bundleId
- the bundle identifier (or app id) of the app to remove.default boolean removeApp(java.lang.String bundleId, @Nullable BaseRemoveApplicationOptions options)
bundleId
- the bundle identifier (or app id) of the app to remove.options
- the set of uninstall options supported by the
particular platform.default void closeApp()
default void activateApp(java.lang.String bundleId)
bundleId
- the bundle identifier (or app id) of the app to activate.default void activateApp(java.lang.String bundleId, @Nullable BaseActivateApplicationOptions options)
bundleId
- the bundle identifier (or app id) of the app to activate.options
- the set of activation options supported by the
particular platform.default ApplicationState queryAppState(java.lang.String bundleId)
bundleId
- the bundle identifier (or app id) of the app to query the state of.ApplicationState
values,default boolean terminateApp(java.lang.String bundleId)
bundleId
- the bundle identifier (or app id) of the app to be terminated.default boolean terminateApp(java.lang.String bundleId, @Nullable BaseTerminateApplicationOptions options)
bundleId
- the bundle identifier (or app id) of the app to be terminated.options
- the set of termination options supported by the
particular platform.