Inherits UbuntuUIToolkitCustomProxyObjectBase.
Autopilot helper for generic scopes.
Definition at line 192 of file dash.py.
def unity8.dash.GenericScopeView.click_scope_item |
( |
|
self, |
|
|
|
category, |
|
|
|
title, |
|
|
|
press_duration = 0.10 |
|
) |
| |
Click an item from the scope.
:parameter category: The name of the category where the item is.
:parameter title: The title of the item.
Definition at line 219 of file dash.py.
220 """Click an item from the scope.
222 :parameter category: The name of the category where the item is.
223 :parameter title: The title of the item.
227 icon = category_element.wait_select_single(
228 'AbstractButton', title=title)
229 list_view = self.select_single(
230 ListViewWithPageHeader, objectName=
'categoryListView')
231 list_view.swipe_child_into_view(icon)
232 self.pointing_device.click_object(icon, press_duration=press_duration)
def _get_category_element(self, category)
def unity8.dash.GenericScopeView.get_applications |
( |
|
self, |
|
|
|
category |
|
) |
| |
Return the list of applications on a category.
:parameter category: The name of the category.
Definition at line 243 of file dash.py.
244 """Return the list of applications on a category.
246 :parameter category: The name of the category.
250 see_all = category_element.select_single(objectName=
'seeAll')
251 application_cards = category_element.select_many(
'AbstractButton')
253 application_cards = sorted(
254 (card
for card
in application_cards
255 if card.globalRect.y < see_all.globalRect.y),
256 key=
lambda card: (card.globalRect.y, card.globalRect.x))
259 for card
in application_cards:
260 if card.objectName
not in (
'cardToolCard',
'seeAll'):
261 result.append(card.title)
def _get_category_element(self, category)
def get_applications(self, category)
def unity8.dash.GenericScopeView.open_preview |
( |
|
self, |
|
|
|
category, |
|
|
|
app_name, |
|
|
|
press_duration = 0.10 |
|
) |
| |
Open the preview of an application.
:parameter category: The name of the category where the application is.
:parameter app_name: The name of the application.
:return: The opened preview.
Definition at line 196 of file dash.py.
197 """Open the preview of an application.
199 :parameter category: The name of the category where the application is.
200 :parameter app_name: The name of the application.
201 :return: The opened preview.
208 preview_list = self.wait_select_single(
209 'QQuickLoader', objectName=
'subPageLoader')
210 preview_list.subPageShown.wait_for(
True)
211 preview_list.x.wait_for(0)
212 self.get_root_instance().select_single(
213 objectName=
'processingIndicator').visible.wait_for(
False)
214 return preview_list.select_single(
215 Preview, objectName=
'preview{}'.format(
216 preview_list.initialIndex))
The documentation for this class was generated from the following file: