Inherits UbuntuUIToolkitCustomProxyObjectBase.
Autopilot helper for generic scopes.
Definition at line 191 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 217 of file dash.py.
218 """Click an item from the scope. 220 :parameter category: The name of the category where the item is. 221 :parameter title: The title of the item. 225 icon = category_element.wait_select_single(
226 'UCAbstractButton', title=title)
227 list_view = self.select_single(
228 ListViewWithPageHeader, objectName=
'categoryListView')
229 list_view.swipe_child_into_view(icon)
230 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 241 of file dash.py.
242 """Return the list of applications on a category. 244 :parameter category: The name of the category. 248 see_all = category_element.select_single(objectName=
'seeAll')
249 application_cards = category_element.select_many(
'UCAbstractButton')
251 application_cards = sorted(
252 (card
for card
in application_cards
253 if card.globalRect.y < see_all.globalRect.y),
254 key=
lambda card: (card.globalRect.y, card.globalRect.x))
257 for card
in application_cards:
258 if card.objectName
not in (
'cardToolCard',
'seeAll'):
259 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 195 of file dash.py.
196 """Open the preview of an application. 198 :parameter category: The name of the category where the application is. 199 :parameter app_name: The name of the application. 200 :return: The opened preview. 207 preview_list = self.wait_select_single(
208 'QQuickLoader', objectName=
'subPageLoader')
209 preview_list.subPageShown.wait_for(
True)
210 preview_list.x.wait_for(0)
211 self.get_root_instance().select_single(
212 objectName=
'processingIndicator').visible.wait_for(
False)
213 return preview_list.select_single(
214 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: