on xenial help sign in
Faster way to get to the scope loader we want
8c47040Albert Astals
tests/autopilot/unity8/shell/emulators/dash.py+6−2
@@ -90,8 +90,12 @@ class Dash(emulators.UnityEmulatorBase):
90
90
91 def _get_scope_loader(self, scope_id):
91 def _get_scope_loader(self, scope_id):
92 try:
92 try:
93− return self.dash_content_list.wait_select_single(
93+ aux = self.dash_content_list.get_children_by_type('QQuickItem')[0]
94− 'QQuickLoader', scopeId=scope_id)
94+ for l in aux.get_children_by_type('QQuickLoader'):
95+ if (l.scopeId == scope_id):
96+ return l;
97+ raise emulators.UnityEmulatorException(
98+ 'No scope found with id {0}'.format(scope_id))
95 except dbus.StateNotFoundError:
99 except dbus.StateNotFoundError:
96 raise emulators.UnityEmulatorException(
100 raise emulators.UnityEmulatorException(
97 'No scope found with id {0}'.format(scope_id))
101 'No scope found with id {0}'.format(scope_id))