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 218 of file dash.py.
219 """Click an item from the scope.
221 :parameter category: The name of the category where the item is.
222 :parameter title: The title of the item.
226 icon = category_element.wait_select_single(
227 'UCAbstractButton', title=title)
228 list_view = self.select_single(
229 ListViewWithPageHeader, objectName=
'categoryListView')
230 list_view.swipe_child_into_view(icon)
231 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 242 of file dash.py.
243 """Return the list of applications on a category.
245 :parameter category: The name of the category.
249 see_all = category_element.select_single(objectName=
'seeAll')
250 application_cards = category_element.select_many(
'UCAbstractButton')
252 application_cards = sorted(
253 (card
for card
in application_cards
254 if card.globalRect.y < see_all.globalRect.y),
255 key=
lambda card: (card.globalRect.y, card.globalRect.x))
258 for card
in application_cards:
259 if card.objectName
not in (
'cardToolCard',
'seeAll'):
260 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{}'.format(
215 preview_list.initialIndex))
The documentation for this class was generated from the following file: