Inherits UbuntuUIToolkitCustomProxyObjectBase.
Autopilot helper for generic scopes.
Definition at line 190 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 216 of file dash.py.
217 """Click an item from the scope. 219 :parameter category: The name of the category where the item is. 220 :parameter title: The title of the item. 224 icon = category_element.wait_select_single(
225 'UCAbstractButton', title=title)
226 list_view = self.select_single(
227 ListViewWithPageHeader, objectName=
'categoryListView')
228 list_view.swipe_child_into_view(icon)
229 self.pointing_device.click_object(icon, press_duration=press_duration)
def click_scope_item(self, category, title, press_duration=0.10)
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 240 of file dash.py.
241 """Return the list of applications on a category. 243 :parameter category: The name of the category. 247 see_all = category_element.select_single(objectName=
'seeAll')
248 application_cards = category_element.select_many(
'UCAbstractButton')
250 application_cards = sorted(
251 (card
for card
in application_cards
252 if card.globalRect.y < see_all.globalRect.y),
253 key=
lambda card: (card.globalRect.y, card.globalRect.x))
256 for card
in application_cards:
257 if card.objectName
not in (
'cardToolCard',
'seeAll'):
258 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 194 of file dash.py.
195 """Open the preview of an application. 197 :parameter category: The name of the category where the application is. 198 :parameter app_name: The name of the application. 199 :return: The opened preview. 206 preview_list = self.wait_select_single(
207 'QQuickLoader', objectName=
'subPageLoader')
208 preview_list.subPageShown.wait_for(
True)
209 preview_list.x.wait_for(0)
210 self.get_root_instance().select_single(
211 objectName=
'processingIndicator').visible.wait_for(
False)
212 return preview_list.select_single(
213 Preview, objectName=
'preview')
def click_scope_item(self, category, title, press_duration=0.10)
def open_preview(self, category, app_name, press_duration=0.10)
The documentation for this class was generated from the following file: