@@ -110,6 +110,7 @@ class QQuickView(emulators.UnityEmulatorBase):
110110 start_y = end_y = y + height // 2
111111
112112 self.pointing_device.drag(start_x, start_y, end_x, end_y)
113+ self.get_current_focused_app_id().wait_for('unity8-dash')
113114
114115 def _get_shell(self):
115116 return self.select_single('Shell')
@@ -123,6 +124,8 @@ class QQuickView(emulators.UnityEmulatorBase):
123124 """Open the dash clicking the dash icon on the launcher."""
124125 launcher = self.open_launcher()
125126 launcher.click_dash_icon()
127+ self.get_current_focused_app_id().wait_for('unity8-dash')
128+ launcher.shown.wait_for(False)
126129
127130 @autopilot_logging.log_action(logger.info)
128131 def open_launcher(self):
@@ -136,6 +139,18 @@ class QQuickView(emulators.UnityEmulatorBase):
136139 def is_launcher_open(self):
137140 return self._get_launcher().shown
138141
142+ @autopilot_logging.log_action(logger.info)
143+ def launch_application(self, application_name):
144+ """Launch an application.
145+
146+ :parameter application_name: The name of the application to launch.
147+
148+ """
149+ launcher = self.open_launcher()
150+ launcher.click_application_launcher_icon(application_name)
151+ self.get_current_focused_app_id().wait_for(application_name)
152+ launcher.shown.wait_for(False)
153+
139154 def enter_pin_code(self, code):
140155 """Enter code 'code' into the single-pin lightdm pincode entry screen.
141156