autopilot.application.ClickApplicationLauncher

class autopilot.application.ClickApplicationLauncher(case_addDetail=None, emulator_base=None, dbus_bus='session')

Fixture to manage launching a Click application.A class that knows how to launch an application with a certain type of introspection enabled.

Parameters:
  • case_addDetail – addDetail method to use.
  • proxy_base – custom proxy base class to use, defaults to None
  • dbus_bus – dbus bus to use, if set to something other than the default (‘session’) the environment will be patched
launch(package_id, app_name=None, app_uris=[])

Launch a click package application with introspection enabled.

This method takes care of launching a click package with introspection exabled. You probably want to use this method if your application is packaged in a click application, or is started via upstart.

Usage is similar to NormalApplicationLauncher.launch:

from autopilot.application import ClickApplicationLauncher
launcher = ClickApplicationLauncher()
launcher.setUp()
app_proxy = launcher.launch('com.ubuntu.dropping-letters')
Parameters:
  • package_id – The Click package name you want to launch. For example: com.ubuntu.dropping-letters
  • app_name – Currently, only one application can be packaged in a click package, and this parameter can be left at None. If specified, it should be the application name you wish to launch.
  • app_uris – Parameters used to launch the click package. This parameter will be left empty if not used.
Raises:
  • RuntimeError – If the specified package_id cannot be found in the click package manifest.
  • RuntimeError – If the specified app_name cannot be found within the specified click package.
Returns:

proxy object for the launched package application