Introspecting Dash results raises Exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Invalid
|
Undecided
|
Unassigned | ||
Unity |
Triaged
|
Undecided
|
Unassigned | ||
unity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
#!/usr/bin/env python
from __future__ import absolute_import
from autopilot.
from unity.emulators
from time import sleep
def dash():
""" Dash tests """
# Get dash
dash = Dash()
# Show the dash
dash.
# Show Application lens
dash.
# Search for Terminal
keyboard = Keyboard()
keyboard.
# Wait
sleep(10)
# Get active lens
lens = dash.get_
# Get Installed category
category = lens.get_
# Get results of Installed applications
results = category.
for result in results:
print result.__state
if __name__ == '__main__':
dash()
---
Xlib.protocol.
Xlib.protocol.
Backend : gconf
Integration : true
Profile : unity
Adding plugins
Initializing core options...done
Traceback (most recent call last):
File "./test_dash.py", line 33, in <module>
dash()
File "./test_dash.py", line 30, in dash
print result.name
File "/usr/lib/
self.
File "/usr/lib/
name, new_state = self.get_
File "/usr/lib/
raise StateNotFoundEr
autopilot.
Changed in unity (Ubuntu): | |
status: | New → Confirmed |
This is a problem in Unity - the dee model objects are all allocated in such a way that we can only wrap them in an adapter when adding them to the introspection tree. This happens each time an autopilot query arrives, so the Ids are different for each query, which in turn makes trouble for autopilot.
Probably the only way to fix this is to export the dash result objects differently from within Unity - not as separate objects in the object tree, but as an array of results from one of the existing dash objects.