Unity 8
 All Classes Functions Properties
unity8.shell.emulators.dash.GenericScopeView Class Reference
Inheritance diagram for unity8.shell.emulators.dash.GenericScopeView:
Collaboration diagram for unity8.shell.emulators.dash.GenericScopeView:

Public Member Functions

def open_preview
 

Detailed Description

Autopilot emulator for generic scopes.

Definition at line 154 of file dash.py.

Member Function Documentation

def unity8.shell.emulators.dash.GenericScopeView.open_preview (   self,
  category,
  app_name 
)
Open the preview of an application.

:parameter category: The name of the category where the application is.
:app_name: The name of the application.
:return: The opened preview.

Definition at line 158 of file dash.py.

159  def open_preview(self, category, app_name):
160  """Open the preview of an application.
161 
162  :parameter category: The name of the category where the application is.
163  :app_name: The name of the application.
164  :return: The opened preview.
165 
166  """
167  category_element = self._get_category_element(category)
168  icon = category_element.select_single('AbstractButton', title=app_name)
169  # FIXME some categories need a long press in order to see the preview.
170  # Some categories do not show previews, like recent apps.
171  # --elopio - 2014-1-14
172  self.pointing_device.click_object(icon)
173  preview_list = self.wait_select_single(
174  'PreviewListView', objectName='previewListView')
175  preview_list.x.wait_for(0)
176  return preview_list.select_single(
177  Preview, objectName='preview{}'.format(preview_list.currentIndex))

The documentation for this class was generated from the following file: