X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2FtestClient.py;h=ebf53c87873ed79a635bc098238906c1aa8f33a7;hb=21f0c30f1ad1e4b21379094c5b46752384a26280;hp=e9c1ea042a19d95453ac087f3a719e33209b355f;hpb=f6ca06461319b20463f96a5b37544a540aee11ca;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/tests/testClient.py b/tests/testClient.py index e9c1ea0..ebf53c8 100644 --- a/tests/testClient.py +++ b/tests/testClient.py @@ -5,7 +5,7 @@ from dbus.mainloop.glib import DBusGMainLoop from xml.dom import minidom -from AccessibleTreeCache import AccessibleTreeCache, AccessibleObjectProxy +from accessible_cache import AccessibleCache DBusGMainLoop(set_as_default=True) @@ -13,7 +13,10 @@ def createNode(accessible, parentRef, parentElement): e = minidom.Element("accessible") e.attributes["reference"] = accessible.path - e.attributes["parent"] = accessible.parent + try: + e.attributes["parent"] = accessible.parent.path + except: + pass e.attributes["name"] = accessible.name e.attributes["role"] = str(int(accessible.role)) e.attributes["description"] = accessible.description @@ -23,8 +26,8 @@ def createNode(accessible, parentRef, parentElement): itf.attributes["name"] = i e.appendChild(itf) - for c in accessible.getChildren(): - createNode(c, accessible.path, e) + for i in range(0, accessible.numChildren): + createNode(accessible.getChild(i), accessible.path, e) parentElement.appendChild(e) @@ -34,7 +37,7 @@ def main(argv): loop = gobject.MainLoop() - cache = AccessibleTreeCache(bus, 'test.atspi.tree', '/org/freedesktop/atspi/tree') + cache = AccessibleCache(bus, 'test.atspi.tree', '/org/freedesktop/atspi/tree') root = cache.getRootAccessible() doc = minidom.Document()