Skip to content

App Management

The AppManagement class provides functionality for launching, terminating, and managing application sessions.

optics_framework.api.app_management.AppManagement

A high-level API for managing applications.

This class provides functionality for launching, terminating, and modifying app settings.

Attributes:

Name Type Description
driver object

The driver instance for managing applications.

close_and_terminate_app()

Closes and terminates a specified application.

:param package_name: The package name of the application. :param event_name: The event triggering the app termination, if any.

force_terminate_app(app_name, event_name=None)

Forcefully terminates the specified application.

:param app_name: The name of the application to terminate. :param event_name: The event triggering the forced termination, if any.

get_app_version()

Gets the version of the application.

:return: The version of the application, or None if not available.

get_driver_session_id()

Return the current driver session id, if available.

initialise_setup()

Sets up the environment for the driver module.

This method should be called before performing any application management operations.

launch_app(app_identifier=None, app_activity=None, event_name=None)

Launches the specified application.

:param event_name: The event triggering the app launch, if any.

launch_other_app(app_name, event_name=None)

Starts another application.

:param package_name: The package name of the application. :param event_name: The event triggering the app start, if any.

start_appium_session(event_name=None)

Starts an Appium session.

:param event_name: The event triggering the session start, if any.