Unity 8
unity8.shell.emulators.main_window.QQuickView Class Reference
Inheritance diagram for unity8.shell.emulators.main_window.QQuickView:
Collaboration diagram for unity8.shell.emulators.main_window.QQuickView:

Public Member Functions

def get_greeter (self)
 
def get_login_loader (self)
 
def get_login_list (self)
 
def get_bottombar (self)
 
def get_pinPadLoader (self)
 
def get_lockscreen (self)
 
def get_pinentryField (self)
 
def open_indicator_page (self, indicator_name)
 
def close_indicator_page (self)
 
def show_dash_swiping (self)
 
def get_current_focused_app_id (self)
 
def show_dash_from_launcher (self)
 
def open_launcher (self)
 
def is_launcher_open (self)
 
def launch_application (self, application_name)
 
def enter_pin_code (self, code)
 
def wait_for_notification (self)
 

Detailed Description

An emulator class that makes it easy to interact with the shell

Definition at line 32 of file main_window.py.

Member Function Documentation

def unity8.shell.emulators.main_window.QQuickView.close_indicator_page (   self)
Swipe to close the opened indicator, wait until it's closed.

Definition at line 86 of file main_window.py.

87  """Swipe to close the opened indicator, wait until it's closed."""
88  indicators_menu = self.wait_select_single('IndicatorsMenu')
89  end_x, end_y = input.get_center_point(indicators_menu)
90  start_x = end_x
91  start_y = self.height
92  self.pointing_device.drag(start_x, start_y, end_x, end_y)
93  indicators_menu.fullyClosed.wait_for(True)
94 
def unity8.shell.emulators.main_window.QQuickView.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 145 of file main_window.py.

145  def enter_pin_code(self, code):
146  """Enter code 'code' into the single-pin lightdm pincode entry screen.
147 
148  :param code: must be a string of numeric characters.
149  :raises: TypeError if code is not a string.
150  :raises: ValueError if code contains non-numeric characters.
151 
152  """
153  if not isinstance(code, str):
154  raise TypeError(
155  "'code' parameter must be a string, not %r."
156  % type(code)
157  )
158  for num in code:
159  if not num.isdigit():
160  raise ValueError(
161  "'code' parameter contains non-numeric characters."
162  )
163  self.pointing_device.click_object(
164  self._get_pinpad_button(int(num)))
165 
def unity8.shell.emulators.main_window.QQuickView.get_current_focused_app_id (   self)
Return the id of the focused application.

Definition at line 109 of file main_window.py.

110  """Return the id of the focused application."""
111  return self._get_shell().focusedApplicationId
112 
def unity8.shell.emulators.main_window.QQuickView.launch_application (   self,
  application_name 
)
Launch an application.

:parameter application_name: The name of the application to launch.

Definition at line 134 of file main_window.py.

134  def launch_application(self, application_name):
135  """Launch an application.
136 
137  :parameter application_name: The name of the application to launch.
138 
139  """
140  launcher = self.open_launcher()
141  launcher.click_application_launcher_icon(application_name)
142  self.get_current_focused_app_id().wait_for(application_name)
143  launcher.shown.wait_for(False)
144 
def launch_application(self, application_name)
Definition: main_window.py:134
def unity8.shell.emulators.main_window.QQuickView.open_indicator_page (   self,
  indicator_name 
)
Swipe to open the indicator, wait until it's open.

:returns: The indicator page.

Definition at line 72 of file main_window.py.

72  def open_indicator_page(self, indicator_name):
73  """Swipe to open the indicator, wait until it's open.
74 
75  :returns: The indicator page.
76  """
77  widget = self._get_indicator_panel_item(indicator_name)
78  start_x, start_y = input.get_center_point(widget)
79  end_x = start_x
80  end_y = self.height
81  self.pointing_device.drag(start_x, start_y, end_x, end_y)
82  self.wait_select_single('IndicatorsMenu', fullyOpened=True)
83  return self._get_indicator_page(indicator_name)
84 
def open_indicator_page(self, indicator_name)
Definition: main_window.py:72
def _get_indicator_page(self, indicator_name)
Definition: main_window.py:65
def _get_indicator_panel_item(self, indicator_name)
Definition: main_window.py:59
def unity8.shell.emulators.main_window.QQuickView.show_dash_from_launcher (   self)
Open the dash clicking the dash icon on the launcher.

Definition at line 114 of file main_window.py.

115  """Open the dash clicking the dash icon on the launcher."""
116  launcher = self.open_launcher()
117  launcher.click_dash_icon()
118  self.get_current_focused_app_id().wait_for('unity8-dash')
119  launcher.shown.wait_for(False)
120 
def unity8.shell.emulators.main_window.QQuickView.show_dash_swiping (   self)
Show the dash swiping from the left.

Definition at line 96 of file main_window.py.

96  def show_dash_swiping(self):
97  """Show the dash swiping from the left."""
98  x, y, width, height = self._get_shell().globalRect
99  start_x = x
100  end_x = x + width
101  start_y = end_y = y + height // 2
102 
103  self.pointing_device.drag(start_x, start_y, end_x, end_y)
104  self.get_current_focused_app_id().wait_for('unity8-dash')
105 
def unity8.shell.emulators.main_window.QQuickView.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 173 of file main_window.py.

174  """Wait for a notification dialog to appear.
175 
176  :return: An object for the notification dialog data.
177  :raise StateNotFoundError: if the timeout expires when the
178  notification has not appeared.
179 
180  """
181  notify_list = self.select_single('Notifications',
182  objectName='notificationList')
183  visible_notification = notify_list.wait_select_single('Notification',
184  visible=True)
185  return {'summary': visible_notification.summary,
186  'body': visible_notification.body,
187  'iconSource': visible_notification.iconSource}

The documentation for this class was generated from the following file: