summaryrefslogtreecommitdiff
path: root/tests
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2012-04-29 17:12:27 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2012-04-29 17:12:27 +0200
commitbbf1a087a08705be47315f4f6e6f48be85314505 (patch)
tree1bb710987a03505c16674f291c737ff9675bb2c2 /tests
parent86b9a2808bfc8e48c44098373f16e096d7d8c709 (diff)
autopilot, launcher: get an icon by controlled xid
(bzr r2349.1.3)
Diffstat (limited to 'tests')
-rw-r--r--tests/autopilot/autopilot/emulators/unity/launcher.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/autopilot/autopilot/emulators/unity/launcher.py b/tests/autopilot/autopilot/emulators/unity/launcher.py
index a6b028972..742dcf77c 100644
--- a/tests/autopilot/autopilot/emulators/unity/launcher.py
+++ b/tests/autopilot/autopilot/emulators/unity/launcher.py
@@ -338,6 +338,14 @@ class LauncherModel(UnityIntrospectionObject):
return None
+ def get_icon_by_window_xid(self, xid):
+ """Gets a launcher icon that controls the specified window xid."""
+ icons = [i for i in self.get_children_by_type(SimpleLauncherIcon) if i.xids.contains(xid)]
+ if (len(icons)):
+ return icons[0]
+
+ return None
+
def get_icons_by_filter(self, **kwargs):
"""Get a list of icons that satisfy the given filters.