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 151 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 155 of file dash.py.

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

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