Merge lp:~pitti/autopilot/print-tree into lp:autopilot
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Thomi Richards | ||||
Approved revision: | 357 | ||||
Merged at revision: | 361 | ||||
Proposed branch: | lp:~pitti/autopilot/print-tree | ||||
Merge into: | lp:autopilot | ||||
Diff against target: |
216 lines (+159/-1) 3 files modified
autopilot/introspection/dbus.py (+41/-0) autopilot/tests/functional/test_introspection_features.py (+45/-1) autopilot/tests/unit/test_introspection_features.py (+73/-0) |
||||
To merge this branch: | bzr merge lp:~pitti/autopilot/print-tree | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomi Richards (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+192134@code.launchpad.net |
Commit message
Add print_tree() introspection method for writing a textual representation of the object and all of its children to stdout, a file object, or a file name.
Description of the change
When writing autopilot tests, finding the type and exact properties of the
exact widget that I'm seeing somewhere on the screen is one of the biggest
challenges. Many widgets can get an explicit identifier (objectName in QML or
GtkBuilder ID in Gtk), but often this doesn't help: For example the actually
visible labels in a QML list view are hidden many layers benath some
unintelligible nested QtQuickItem, HandlerDelegate, and other bits, which makes
finding anything in vis hard.
This adds a print_tree() method which gives a textual dump to stdout, a file
object, or a file name which is much easier to use in above cases, or where vis
is not available (ssh to phone). It supports depth-limiting, too.
FAILED: Continuous integration, rev:354 jenkins. qa.ubuntu. com/job/ autopilot- ci/270/ jenkins. qa.ubuntu. com/job/ autopilot- saucy-amd64- ci/198/ console jenkins. qa.ubuntu. com/job/ autopilot- saucy-armhf- ci/198/ console jenkins. qa.ubuntu. com/job/ autopilot- saucy-i386- ci/42/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: 10.97.0. 26:8080/ job/autopilot- ci/270/ rebuild
http://