dogtail-devel [Bug 340734] The (tree API) sample program does not run to completion



Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=340734
 dogtail | Framework | Ver: CVS HEAD





------- Comment #1 from Len DiMaggio  2006-05-05 13:51 UTC -------
Sorry about that - I should have included a diff - thanks to David Malcolm for
pointing that out!  ;-)

$ diff -up gedit-test-utf8-tree-api.py  modified_tree.py 
--- gedit-test-utf8-tree-api.py 2006-05-05 09:48:37.000000000 -0400
+++ tree.py     2006-04-24 11:25:16.000000000 -0400
@@ -11,7 +11,7 @@ environ['LANG']='en_US.UTF-8'

 # Remove the output file, if it's still there from a previous run
 if path.isfile(path.join(path.expandvars("$HOME"), "Desktop",
"UTF8demo.txt")):
-    remove(path.join(path.expandvars("$HOME"), "Desktop", "UTF8demo.txt"))
+       remove(path.join(path.expandvars("$HOME"), "Desktop", "UTF8demo.txt"))

 # Start gedit.
 run("gedit")
@@ -44,11 +44,18 @@ saveas = gedit.dialog('Save as...')
 # We want to save to the file name 'UTF8demo.txt'.
 saveas.child(roleName = 'text').text = 'UTF8demo.txt'

-# Let's save it to the desktop.
-saveas.menuItem('Desktop').click()
+# Save the file on the Desktop

-# Click the Save button.
+# Don't make the mistake of only searching by name, there are multiple
+# "Desktop" entires in the Save As dialog - you have to query for the
+# roleName too - see the on-line help for the Dogtail "tree" class for
+# details
+desktop = saveas.child('Desktop', roleName='table cell')
+desktop.actions['activate'].do()
+
+#  Click the Save button.
 saveas.button('Save').click()

 # Let's quit now.
-filemenu.menuItem('Quit').click()
+filemenu.menuItem('Quit').click() 
+


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the QA contact for the bug.
You are watching the assignee for the bug.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]