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 381899 - stateenabled function doesn't work
stateenabled function doesn't work
Status: RESOLVED NOTABUG
Product: LDTP
Classification: Other
Component: ldtp
0.6.x
Other All
: Normal minor
: ---
Assigned To: LDTP maintainers
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2006-12-03 15:44 UTC by srinivas
Modified: 2006-12-04 07:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description srinivas 2006-12-03 15:44:15 UTC
Please describe the problem:
the stateenabled function is used to find if an object is enabled in a window. When used, this function gives the following error :

stateenabled('*gedit','btnPrint')
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
  • File "/usr/local/lib/python2.4/site-packages/ldtp.py", line 2458 in stateenabled
    _message = generatexml (command.STATENEABLED, _requestId, windowName, componentName)
AttributeError: class command has no attribute 'STATENEABLED'




Steps to reproduce:
1. open python shell
2. enter from ldtp import *
3. then enter stateenabled('<some-win-name>','<some-button>') .. i used *gedit as window name and btnPrint for the component


Actual results:


Expected results:
1 or 0 depending on the state of the object (disabled or enabled)

Does this happen every time?
yes

Other information:
i think 'STATENEABLED' is a typo in ldtp.py
Comment 1 srinivas 2006-12-03 15:56:43 UTC
i found that setcursorposition, getcursorposition also give same kind of errors 
(though i dont think they are typos) 

>>>getcursorposition('*gedit','txt0')
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
  • File "/usr/local/lib/python2.4/site-packages/ldtp.py", line 1248 in getcursorposition
    _message = generatexml (command.GETCURSORPOSITION, _requestId, windowName, componentName)
AttributeError: class command has no attribute 'GETCURSORPOSITION'

>>> setcursorposition('*gedit','txt0',1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/ldtp.py", line 1266, in setcursorposition
    _message = generatexml (command.SETCURSORPOSITION, _requestId, windowName, componentName, str (position))
AttributeError: class command has no attribute 'SETCURSORPOSITION'
Comment 2 Nagappan Alagappan 2006-12-04 07:04:15 UTC
Srinivas: It works perfectly fine for me. Try uninstalling previous version of ldtp modules and install the new version of ldtp python module, which should solve the problem.

Check ldtp.py in /usr/lib/python/site-packages and also in /usr/local/lib/python/site-packages