Interface InteractsWithApps

All Superinterfaces:
CanRememberExtensionPresence, ExecutesMethod
All Known Implementing Classes:
AndroidDriver, FlutterAndroidDriver, FlutterIOSDriver, IOSDriver

public interface InteractsWithApps extends ExecutesMethod, CanRememberExtensionPresence
  • Method Details

    • installApp

      default void installApp(String appPath)
      Install an app on the mobile device.
      Parameters:
      appPath - path to app to install.
    • installApp

      default void installApp(String appPath, @Nullable BaseInstallApplicationOptions options)
      Install an app on the mobile device.
      Parameters:
      appPath - path to app to install or a remote URL.
      options - Set of the corresponding installation options for the particular platform.
    • isAppInstalled

      default boolean isAppInstalled(String bundleId)
      Checks if an app is installed on the device.
      Parameters:
      bundleId - bundleId of the app.
      Returns:
      True if app is installed, false otherwise.
    • runAppInBackground

      default void runAppInBackground(Duration duration)
      Runs the current app in the background for the time requested. This is a synchronous method, it blocks while the application is in background.
      Parameters:
      duration - The time to run App in background. Minimum time resolution unit is one millisecond. Passing a negative value will switch to Home screen and return immediately.
    • removeApp

      default boolean removeApp(String bundleId)
      Remove the specified app from the device (uninstall).
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to remove.
      Returns:
      true if the uninstall was successful.
    • removeApp

      default boolean removeApp(String bundleId, @Nullable BaseRemoveApplicationOptions options)
      Remove the specified app from the device (uninstall).
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to remove.
      options - the set of uninstall options supported by the particular platform.
      Returns:
      true if the uninstall was successful.
    • activateApp

      default void activateApp(String bundleId)
      Activates the given app if it installed, but not running or if it is running in the background.
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to activate.
    • activateApp

      default void activateApp(String bundleId, @Nullable BaseActivateApplicationOptions options)
      Activates the given app if it installed, but not running or if it is running in the background.
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to activate.
      options - the set of activation options supported by the particular platform.
    • queryAppState

      default ApplicationState queryAppState(String bundleId)
      Queries the state of an application.
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to query the state of.
      Returns:
      one of possible ApplicationState values,
    • terminateApp

      default boolean terminateApp(String bundleId)
      Terminate the particular application if it is running.
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to be terminated.
      Returns:
      true if the app was running before and has been successfully stopped.
    • terminateApp

      default boolean terminateApp(String bundleId, @Nullable BaseTerminateApplicationOptions options)
      Terminate the particular application if it is running.
      Parameters:
      bundleId - the bundle identifier (or app id) of the app to be terminated.
      options - the set of termination options supported by the particular platform.
      Returns:
      true if the app was running before and has been successfully stopped.