All Classes Functions Properties
unity8.shell.emulators.dash.GenericScopeView Class Reference
Inheritance diagram for unity8.shell.emulators.dash.GenericScopeView:
[legend]
Collaboration diagram for unity8.shell.emulators.dash.GenericScopeView:
[legend]

## 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.

def 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.
"""
category_element = self._get_category_element(category)
icon = category_element.select_single('Card', title=app_name)
# FIXME some categories need a long press in order to see the preview.
# Some categories do not show previews, like recent apps.
# --elopio - 2014-1-14
self.pointing_device.click_object(icon)
preview_list = self.get_root_instance().wait_select_single(
'PreviewListView', objectName='dashContentPreviewList')
preview_list.x.wait_for(0)
return preview_list.select_single(
Preview, objectName='preview{}'.format(preview_list.currentIndex))
unity8.shell.emulators.dash.GenericScopeView.open_preview
def open_preview
Definition: dash.py:155
unity8.shell.emulators.dash.GenericScopeView._get_category_element
def _get_category_element
Definition: dash.py:175

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

- tests/autopilot/unity8/shell/emulators/dash.py