It should be possible to search the object tree recursively starting from a given node

Bug #1144288 reported by Michael Zanetti
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
High
Christopher Lee
autopilot (Ubuntu)
Fix Released
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned

Bug Description

There are two main functions used in autopilot to search for objects:

- select_single()
- get_children_by_type()

select_single() does recursion, but it always searches the whole tree.
get_children_by_type() starts at the given node, but does not recurse.

In my opinion all object search methods should be capable to recurse starting from a certain node. It would be very useful to be able to call select_single() on a node to search a child node. Especially with QML that would ease things up a lot. Also, it'd be useful to get a nodes children by type, but recursing.

This has been the very first thing I missed in autopilot and every developer I introduced to autopilot asked this as the very first question (after setting up the environment)

Adding this should not remove the possibility to only search for direct children without recursion as that is sometimes needed as well.

Related branches

Changed in autopilot:
status: New → Confirmed
Revision history for this message
Gerry Boland (gerboland) wrote :

+1

information type: Public → Private Security
information type: Private Security → Public
Changed in autopilot:
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

I agree, and I've been working towards this goal for a while. First, I needed to get the new libxpathselect in place, which took longer than expected.

The change required is not difficult, but it needs to be done carefully to maintain backwards compatibility.

Changed in autopilot:
milestone: none → 1.3
Changed in autopilot:
assignee: Thomi Richards (thomir) → Christopher Lee (veebers)
status: Triaged → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:autopilot at revision 173, scheduled for release in autopilot, milestone 1.3

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

This bug was fixed in the package autopilot - 1.3daily13.06.05-0ubuntu2

---------------
autopilot (1.3daily13.06.05-0ubuntu2) saucy; urgency=low

  * autopilot-touch only suggests python-ubuntu-platform-api for now.
    It's not in distro and we need that requirement to be fulfilled to
    have unity 7, 100 scopes and the touch stack to distro.
 -- Didier Roche <email address hidden> Fri, 07 Jun 2013 13:33:46 +0200

Changed in autopilot (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

raring has seen the end of its life and is no longer receiving any updates. Marking the raring task for this ticket as "Won't Fix".

Changed in autopilot (Ubuntu Raring):
status: New → Won't Fix
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.