~zsombi/ubuntu-ui-toolkit/listitemSelectModeBugs

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py

  • Committer: Zsombor Egri
  • Date: 2015-11-16 06:35:05 UTC
  • mfrom: (1664.1.1 listitemSelectModeBugs)
  • Revision ID: zsombor.egri@canonical.com-20151116063505-cwn2qfks7qzk10g9
re-sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
        if tabs_model_properties.selectedIndex == index:
224
224
            return
225
225
 
 
226
        popover = self.get_root_instance().select_single(
 
227
            objectName='tabsPopover')
 
228
 
226
229
        try:
227
 
            tab_button = self.get_root_instance().select_single(
228
 
                objectName='select_tab_' + str(index)
229
 
                + '_header_overflow_button')
230
 
        except dbus.StateNotFoundError:
 
230
            # 1.3, using ActionSelectionPopover
 
231
            action_name = 'select_tab_' + str(index)
 
232
            popover.click_action_button(action_name)
 
233
        except _common.ToolkitException:
231
234
            try:
 
235
                # < 1.3 using custom popover
232
236
                tab_button = self.get_root_instance().select_single(
233
237
                    objectName='tabButton' + str(index))
 
238
                self.pointing_device.click_object(tab_button)
234
239
            except dbus.StateNotFoundError:
235
240
                raise _common.ToolkitException(
236
241
                    "Tab button {0} not found.".format(index))
237
 
        self.pointing_device.click_object(tab_button)
 
242
 
238
243
        self.wait_for_animation()
239
244
 
240
245
    def click_action_button(self, action_object_name):