GNOME Bugzilla – Bug 348891
Dogtail misinterprets regexps in strings
Last modified: 2006-10-10 20:35:48 UTC
Please describe the problem: I just found this in writing a test script for Frysk. A combo box menuitem included these characters in its name: (A) And Dogtail was unable to recognize it until the (A) was removed. I'm guessing that Dogtail is misintrepreting this string as a regexp. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Where did the (A) need to be removed from? The script, or Frysk? Also, please attach a traceback.
This problem is seen on Fedora FC5 (686 - 2.6.15-1.2054_FC5) with Dogtail and PYSPI version 0.6x (the same problem is seen with PYSPI and Dogtail built from CVS head 20060918 22:00 EDT USA). Here's the scenario, Frysk includes a button with this this text: (Click Here to Select a Process) (See the attachment for a screenshot.) Dogtail can't locate this button - but it is able to locate other buttons that do not include () in their names - is this being misinterpreted as a regexp? ------------------------------------------------------- >>> from dogtail.procedural import * >>> focus.application('Frysk') >>> click('Debug an Existing Process', roleName='radio button') click on {child with name="Debug an Existing Process" roleName='radio button'} >>> click('(Click Here to Select a Process)', roleName='push button') Traceback (most recent call last):
+ Trace 72750
Action.__call__(self, name = name, roleName = roleName, description = description, delay = delay)
FocusWidget.__call__(self, name = name, roleName = roleName, description = description)
raise FocusError, predicate.debugName
>>> click('Quit', roleName='push button') click on {child with name="Quit" roleName='push button'} -------------------------------------------------------
Created attachment 73037 [details] Screenshot - example of Frysk GUI string containing () - that Dogtail cannot locate
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.