After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348891 - Dogtail misinterprets regexps in strings
Dogtail misinterprets regexps in strings
Status: RESOLVED FIXED
Product: dogtail
Classification: Deprecated
Component: Framework
CVS HEAD
Other All
: Normal normal
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-27 03:34 UTC by Len DiMaggio
Modified: 2006-10-10 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot - example of Frysk GUI string containing () - that Dogtail cannot locate (260.93 KB, image/jpeg)
2006-09-19 15:03 UTC, Len DiMaggio
Details

Description Len DiMaggio 2006-07-27 03:34:25 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:
Comment 1 Zack Cerza 2006-08-01 17:49:24 UTC
Where did the (A) need to be removed from? The script, or Frysk?

Also, please attach a traceback.
Comment 2 Len DiMaggio 2006-09-19 14:59:58 UTC
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):
  • File "<stdin>", line 1 in ?
  • File "/usr/lib/python2.4/site-packages/dogtail/procedural.py", line 279 in __call__
    Action.__call__(self, name = name, roleName = roleName, description = description, delay = delay)
  • File "/usr/lib/python2.4/site-packages/dogtail/procedural.py", line 211 in __call__
    FocusWidget.__call__(self, name = name, roleName = roleName, description = description)
  • File "/usr/lib/python2.4/site-packages/dogtail/procedural.py", line 120 in __call__
    raise FocusError, predicate.debugName
dogtail.procedural.FocusError: child with name="(Click Here to Select a Process)" roleName='push button'

>>> click('Quit', roleName='push button')
click on {child with name="Quit" roleName='push button'}

-------------------------------------------------------
Comment 3 Len DiMaggio 2006-09-19 15:03:31 UTC
Created attachment 73037 [details]
Screenshot - example of Frysk GUI string containing () - that Dogtail cannot locate
Comment 4 Zack Cerza 2006-10-10 20:35:48 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.