https://bugzilla.gnome.org/show_bug.cgi?id=668514 LDTP | general | 2.2
Summary: Provide obj_index for all windows Classification: Other Product: LDTP Version: 2.2 OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: Normal Component: general AssignedTo: ldtp-ma...@gnome.bugs ReportedBy: a9016...@gmx.de QAContact: ldtp-dev@lists.freedesktop.org GNOME version: --- Filing this report as per mailing list postings, so this does not get forgotten. I would like to access ALL objects in a script by using the objects' indexes. It seems that some objects simply don't have an index, as the LDTP Tutorial PDF states on page 13 ("Different ways of representing window name", item 7): "Window type and index (only if window does not have any accessible title, Ex: 'dlg0')". For example, I get an error when I try to get the index of the "gedit Preferences" dialog when going to Edit > Preferences with this code. # -*- coding: utf-8 -*- #!/usr/bin/python from ldtp import * launchapp('gedit', lang = 'en_US.utf8') if waittillguiexist ('*gedit') == 0: raise LdtpExecutionError ('Application window does not exist') print "Application window exists." selectmenuitem ('*gedit', 'mnu#32') if waittillguiexist ('dlggeditPreferences') == 0: raise LdtpExecutionError ('Dialog window does not exist') time.sleep (3) OBJECTINDEX = getobjectproperty('*gedit', 'dlggeditPreferences', 'obj_index') print "obj_index for dlggeditPreferences is: " print OBJECTINDEX The error is: Traceback (most recent call last): File "index.py", line 12, in <module> OBJECTINDEX = getobjectproperty('*gedit', 'dlggeditPreferences', 'obj_index') File "/usr/lib/python2.7/site-packages/ldtp/client.py", line 65, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/xmlrpclib.py", line 1575, in __request verbose=self.__verbose File "/usr/lib/python2.7/site-packages/ldtp/client.py", line 180, in request raise LdtpExecutionError(e.faultString.encode('utf-8')) ldtp.client_exception.LdtpExecutionError: Unknown property "obj_index" in dlggeditPreferences Nag's answer on the mailing list was: "As of now, we don't have option for obj_index for all the windows. I mean, you can access: getobjectproperty('dlggeditPreferences', 'dlggeditPreferences', 'obj_index') but the result will be just based on the current window. Maybe will try to implement it based on the current application." -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are watching the assignee of the bug. _______________________________________________ LDTP-dev mailing list LDTP-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/ldtp-dev