It's not possible to access the path attribute

Bug #1205204 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
Critical
Unassigned
autopilot (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I'm writing tests for the ubuntu-filemanager-app, and on the list of folders it stores the full folder path on the 'path' attribute.
But when I do element.path, instead of the folder path I get the dbus path.

I think that's because on DBusIntrospectionObject we do:

def __init__(self, state_dict, path):
        self.__state = {}
        self.__refresh_on_attribute = True
        self._set_properties(state_dict)
        self.path = path

So we are overwriting the original path attribute.

Related branches

Revision history for this message
Leo Arias (elopio) wrote :

Maybe we can store the dbus path on self.dbus_path. Of course, we would have the same problem if the UI element has a dbus_path attribute, but it sounds less common.

Or maybe, we should store the dbus path on __dbus_path and add a method get_dbus_path.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Confirmed - this variable should start with '_', marking it as private. Would be an easy fix for someone.

Changed in autopilot:
status: New → Confirmed
importance: Undecided → Medium
Changed in autopilot:
importance: Medium → Critical
Changed in autopilot:
assignee: nobody → Thomi Richards (thomir)
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot/1.3 at revision 324, scheduled for release in autopilot, milestone Unknown

Changed in autopilot:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot - 1.3.1+13.10.20130918-0ubuntu1

---------------
autopilot (1.3.1+13.10.20130918-0ubuntu1) saucy; urgency=low

  [ Jean-Baptiste Lallement ]
  * Added autopilot-sandbox-run to run autopilot tests in a 'fake' X
    server. Xephyr and Xvfb are supported. (LP: #1226070)

  [ Thomi Richards ]
  * kzgdiparg ugp srgp s r ua. (LP: #1205204)
  * Add support for click packages. (LP: #1212833)
  * Update StateNotFoundErrror exception to give more informative
    messages. (LP: #1225701)
  * Fix select_single inconsistency. (LP: #1225692)
  * Create wait_select_single method. (LP: #1223428)
  * Add test case for applications that exit with SIGABRT when launched
    with autopilot.
  * Back out changes that would break test case compatibility. (LP:
    #1226505)
  * Performance improvments for launching and closing applications under
    test with autopilot. (LP: #1218636)

  [ Andy Doan ]
  * Add support for click packages. (LP: #1212833)

  [ Christopher Lee ]
  * commit message. (LP: #1205949)

  [ Martin Pitt ]
  * Add bamfdaemon to autopilot-desktop dependencies, to avoid long
    delays when running autopilot in minimal environments. (LP:
    #1224970)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 333
 -- Ubuntu daily release <email address hidden> Wed, 18 Sep 2013 06:03:34 +0000

Changed in autopilot (Ubuntu):
status: New → Fix Released
Changed in autopilot:
status: Fix Committed → Fix Released
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.