gnome-screenshot test needs drop-shadow feature added

Bug #1188781 reported by Carla Sella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Autopilot Tests
Confirmed
Undecided
Unassigned

Bug Description

Autopilot test: http://bazaar.launchpad.net/~ubuntu-testcase/ubuntu-autopilot-tests/trunk/files/head:/ubuntu_autopilot_tests/screenshot/

Gnome-screenshot 'Apply effect' drop down box has these attributes:

        self.drop_shadow_effect_shadow=self.app.select_single('GtkComboBoxAccessible', accessible_name='shadow')
        self.drop_shadow_effect_none=self.app.select_single('GtkComboBoxAccessible', accessible_name='none')
        self.drop_shadow_effect_border=self.app.select_single('GtkComboBoxAccessible', accessible_name='border')

When trying to use these attributes for instance:

        #Select Drop shadow from the Apply effect drop down menu
        if self.drop_shadow_effect_none.enabled == 'True':
           self.pointing_device.move_to_object(self.drop_shadow_effect_none)
        elif self.drop_shadow_effect_shadow.enabled == 'True':
           self.pointing_device.move_to_object(self.drop_shadow_effect_shadow)
        else:
           self.pointing_device.move_to_object(self.drop_shadow_effect_border)
        self.pointing_device.click()
        self.keyboard.press_and_release('Down')
        self.keyboard.type('\n')
        self.pointing_device.click()
        self.pointing_device.click()

Autopilot returns this error:

Traceback (most recent call last):
  File "/home/letozaf/ubuntu-autopilot-tests/ubuntu_autopilot_tests/screenshot/test_screenshot.py", line 107, in test_drop_shadow_effect
    if self.drop_shadow_effect_none.enabled == 'True':
AttributeError: 'NoneType' object has no attribute 'enabled'

The attribute 'enabled' exists if you look for it with autopilot vis.

Changed in autopilot:
status: New → Confirmed
summary: - autopilot fails to detect screenshot attribute
+ gnome-screenshot test need drop-shadow feature added
summary: - gnome-screenshot test need drop-shadow feature added
+ gnome-screenshot test needs drop-shadow feature added
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Hi,

If the object you are looking for exists within the vis tool, but appears not to exist in your autopilot test case, you should probably try using wait_select_single in autopilot 1.4, or something like this in 1.3:

self.assertThat(lambda: self.app.select_single('GtkComboBoxAccessible', accessible_name='none'), Eventually(NotEquals(None)))
self.drop_shadow_effect_none=self.app.select_single('GtkComboBoxAccessible', accessible_name='none')

Changed in autopilot:
status: Confirmed → Incomplete
Changed in ubuntu-autopilot-tests:
status: New → Confirmed
tags: added: needs-autopilot-test
no longer affects: autopilot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.