22 import autopilot.logging
27 logger = logging.getLogger(__name__)
32 """An emulator that understands the Launcher."""
34 @autopilot.logging.log_action(logger.debug)
36 """Show the launcher swiping it to the right."""
39 self.shown.wait_for(
True)
41 logger.debug(
'The launcher is already opened.')
43 def _swipe_to_show_launcher(self):
44 view = self.get_root_instance().select_single(
'QQuickView')
45 start_y = stop_y = view.y + view.height // 2
48 stop_x = start_x + self.panelWidth - 1
50 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
52 @autopilot.logging.log_action(logger.debug)
53 def click_dash_icon(self):
55 dash_icon = self.select_single(
56 'QQuickImage', objectName=
'dashItem')
57 self.pointing_device.click_object(dash_icon)
61 @autopilot.logging.log_action(logger.debug)
62 def click_application_launcher_icon(self, application_name):
63 launcher_delegate = self.select_single(
64 'LauncherDelegate', appId=application_name)
65 self.pointing_device.click_object(launcher_delegate)
def _swipe_to_show_launcher