@@ -192,7 +192,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
192192 """Autopilot emulator for generic scopes."""
193193
194194 @autopilot_logging.log_action(logger.info)
195− def open_preview(self, category, app_name):
195+ def open_preview(self, category, app_name, press_duration=0.10):
196196 """Open the preview of an application.
197197
198198 :parameter category: The name of the category where the application is.
@@ -203,16 +203,18 @@ class GenericScopeView(emulators.UnityEmulatorBase):
203203 # FIXME some categories need a long press in order to see the preview.
204204 # Some categories do not show previews, like recent apps.
205205 # --elopio - 2014-1-14
206− self.click_scope_item(category, app_name)
206+ self.click_scope_item(category, app_name, press_duration)
207207 preview_list = self.wait_select_single(
208208 'QQuickLoader', objectName='subPageLoader')
209209 preview_list.subPageShown.wait_for(True)
210210 preview_list.x.wait_for(0)
211+ self.get_root_instance().select_single(
212+ objectName='processingIndicator').visible.wait_for(False)
211213 return preview_list.select_single(
212214 Preview, objectName='preview{}'.format(preview_list.currentIndex))
213215
214216 @autopilot_logging.log_action(logger.debug)
215− def click_scope_item(self, category, title):
217+ def click_scope_item(self, category, title, press_duration=0.10):
216218 """Click an item from the scope.
217219
218220 :parameter category: The name of the category where the item is.
@@ -225,7 +227,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
225227 list_view = self.select_single(
226228 ListViewWithPageHeader, objectName='categoryListView')
227229 list_view.swipe_child_into_view(icon)
228− self.pointing_device.click_object(icon)
230+ self.pointing_device.click_object(icon, press_duration=press_duration)
229231
230232 def _get_category_element(self, category):
231233 try: