@@ -90,8 +90,12 @@ class Dash(emulators.UnityEmulatorBase):
9090
9191 def _get_scope_loader(self, scope_id):
9292 try:
93− return self.dash_content_list.wait_select_single(
94− 'QQuickLoader', scopeId=scope_id)
93+ aux = self.dash_content_list.get_children_by_type('QQuickItem')[0]
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))
9599 except dbus.StateNotFoundError:
96100 raise emulators.UnityEmulatorException(
97101 'No scope found with id {0}'.format(scope_id))
@@ -125,10 +129,15 @@ class Dash(emulators.UnityEmulatorBase):
125129 original_index = self.dash_content_list.currentIndex
126130 dash_content = self.select_single(objectName="dashContent")
127131 x, y, width, height = dash_content.globalRect
128− start_x = x + width / 3
129− stop_x = x + width / 3 * 2
132+ # Make the drag range be a multiple of the drag "rate" value.
133+ # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
134+ rate = 10
135+ divisions = 5
136+ jump = ( width / divisions ) // rate * rate
137+ start_x = x + jump
138+ stop_x = x + jump * (divisions - 1)
130139 start_y = stop_y = y + 1
131− self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
140+ self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
132141 self.dash_content_list.currentIndex.wait_for(original_index - 1)
133142
134143 @autopilot_logging.log_action(logger.info)
@@ -136,10 +145,15 @@ class Dash(emulators.UnityEmulatorBase):
136145 original_index = self.dash_content_list.currentIndex
137146 dash_content = self.select_single(objectName="dashContent")
138147 x, y, width, height = dash_content.globalRect
139− start_x = x + width / 3 * 2
140− stop_x = x + width / 3
148+ # Make the drag range be a multiple of the drag "rate" value.
149+ # Workarounds https://bugs.launchpad.net/mir/+bug/1399690
150+ rate = 10
151+ divisions = 5
152+ jump = ( width / divisions ) // rate * rate
153+ start_x = x + jump * (divisions - 1)
154+ stop_x = x + jump
141155 start_y = stop_y = y + 1
142− self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
156+ self.pointing_device.drag(start_x, start_y, stop_x, stop_y, rate)
143157 self.dash_content_list.currentIndex.wait_for(original_index + 1)
144158
145159 def enter_search_query(self, query):