22 import autopilot.logging
23 import ubuntuuitoolkit
28 logger = logging.getLogger(__name__)
31 class Launcher(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
33 """A helper that understands the Launcher."""
35 @autopilot.logging.log_action(logger.debug)
37 """Show the launcher swiping it to the right."""
40 self.shown.wait_for(
True)
42 logger.debug(
'The launcher is already opened.')
44 def _swipe_to_show_launcher(self):
45 view = self.get_root_instance().select_single(
'ShellView')
46 start_y = stop_y = view.y + view.height // 2
49 stop_x = start_x + self.panelWidth - 1
51 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
53 @autopilot.logging.log_action(logger.debug)
54 def click_dash_icon(self):
56 dash_icon = self.select_single(
57 'QQuickImage', objectName=
'dashItem')
58 self.pointing_device.click_object(dash_icon)
62 @autopilot.logging.log_action(logger.debug)
63 def click_application_launcher_icon(self, application_name):
64 launcher_delegate = self.select_single(
65 'LauncherDelegate', appId=application_name)
66 self.pointing_device.click_object(launcher_delegate)
def _swipe_to_show_launcher(self)