Inherits UbuntuUIToolkitCustomProxyObjectBase.
An helper class that makes it easy to interact with the shell
Definition at line 98 of file __init__.py.
§ close_indicator_page()
def unity8.shell.ShellView.close_indicator_page |
( |
|
self | ) |
|
Swipe to close the opened indicator, wait until it's closed.
Definition at line 152 of file __init__.py.
152 def close_indicator_page(self):
153 """Swipe to close the opened indicator, wait until it's closed.""" 154 indicators_menu = self.wait_select_single(
'IndicatorsMenu')
155 end_x, end_y = input.get_center_point(indicators_menu)
157 start_y = self.height
158 self.pointing_device.drag(start_x, start_y, end_x, end_y)
159 indicators_menu.fullyClosed.wait_for(
True)
§ enter_pin_code()
def unity8.shell.ShellView.enter_pin_code |
( |
|
self, |
|
|
|
code |
|
) |
| |
Enter code 'code' into the single-pin lightdm pincode entry screen.
:param code: must be a string of numeric characters.
:raises: TypeError if code is not a string.
:raises: ValueError if code contains non-numeric characters.
Definition at line 211 of file __init__.py.
211 def enter_pin_code(self, code):
212 """Enter code 'code' into the single-pin lightdm pincode entry screen. 214 :param code: must be a string of numeric characters. 215 :raises: TypeError if code is not a string. 216 :raises: ValueError if code contains non-numeric characters. 219 if not isinstance(code, str):
221 "'code' parameter must be a string, not %r." 225 if not num.isdigit():
227 "'code' parameter contains non-numeric characters." 229 self.pointing_device.click_object(
230 self._get_pinpad_button(int(num)))
§ get_current_focused_app_id()
def unity8.shell.ShellView.get_current_focused_app_id |
( |
|
self | ) |
|
Return the id of the focused application.
Definition at line 175 of file __init__.py.
175 def get_current_focused_app_id(self):
176 """Return the id of the focused application.""" 177 return self._get_shell().focusedApplicationId
§ launch_application()
def unity8.shell.ShellView.launch_application |
( |
|
self, |
|
|
|
application_name |
|
) |
| |
Launch an application.
:parameter application_name: The name of the application to launch.
Definition at line 200 of file __init__.py.
200 def launch_application(self, application_name):
201 """Launch an application. 203 :parameter application_name: The name of the application to launch. 206 launcher = self.open_launcher()
207 launcher.click_application_launcher_icon(application_name)
208 self.get_current_focused_app_id().wait_for(application_name)
209 launcher.shown.wait_for(
False)
§ open_indicator_page()
def unity8.shell.ShellView.open_indicator_page |
( |
|
self, |
|
|
|
indicator_name |
|
) |
| |
Swipe to open the indicator, wait until it's open.
:returns: The indicator page.
Definition at line 138 of file __init__.py.
138 def open_indicator_page(self, indicator_name):
139 """Swipe to open the indicator, wait until it's open. 141 :returns: The indicator page. 143 widget = self._get_indicator_panel_item(indicator_name)
144 start_x, start_y = input.get_center_point(widget)
147 self.pointing_device.drag(start_x, start_y, end_x, end_y)
148 self.wait_select_single(
'IndicatorsMenu', fullyOpened=
True)
149 return self._get_indicator_page(indicator_name)
§ show_dash_from_launcher()
def unity8.shell.ShellView.show_dash_from_launcher |
( |
|
self | ) |
|
Open the dash clicking the dash icon on the launcher.
Definition at line 180 of file __init__.py.
180 def show_dash_from_launcher(self):
181 """Open the dash clicking the dash icon on the launcher.""" 182 launcher = self.open_launcher()
183 launcher.click_dash_icon()
184 self.get_current_focused_app_id().wait_for(
'unity8-dash')
185 launcher.shown.wait_for(
False)
§ show_dash_swiping()
def unity8.shell.ShellView.show_dash_swiping |
( |
|
self | ) |
|
Show the dash swiping from the left.
Definition at line 162 of file __init__.py.
162 def show_dash_swiping(self):
163 """Show the dash swiping from the left.""" 164 x, y, width, height = self._get_shell().globalRect
167 start_y = end_y = y + height // 2
169 self.pointing_device.drag(start_x, start_y, end_x, end_y)
170 self.get_current_focused_app_id().wait_for(
'unity8-dash')
§ wait_for_notification()
def unity8.shell.ShellView.wait_for_notification |
( |
|
self | ) |
|
Wait for a notification dialog to appear.
:return: An object for the notification dialog data.
:raise StateNotFoundError: if the timeout expires when the
notification has not appeared.
Definition at line 251 of file __init__.py.
251 def wait_for_notification(self):
252 """Wait for a notification dialog to appear. 254 :return: An object for the notification dialog data. 255 :raise StateNotFoundError: if the timeout expires when the 256 notification has not appeared. 259 notify_list = self.select_single(
'Notifications',
260 objectName=
'notificationList')
261 visible_notification = notify_list.wait_select_single(
'Notification',
263 return {
'summary': visible_notification.summary,
264 'body': visible_notification.body,
265 'iconSource': visible_notification.iconSource}
The documentation for this class was generated from the following file: