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 668180 - Click actions are not working with Qt
Click actions are not working with Qt
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtp2
2.0.0
Other Linux
: Normal normal
: ---
Assigned To: LDTP Development Mailing List
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2012-01-18 13:07 UTC by Mardy
Modified: 2012-01-18 19:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix: case insensitive action name matching (463 bytes, patch)
2012-01-18 13:07 UTC, Mardy
committed Details | Review

Description Mardy 2012-01-18 13:07:21 UTC
Created attachment 205522 [details] [review]
Fix: case insensitive action name matching

Hi, I'm writing a test which should click a button in a Qt dialog (using Qt 4.8.0):

==========
        window = 'dlgEnteryourusername'
        assert ldtp.waittillguiexist(window) == 1
        log.debug('Window appeared')
        ldtp.wait(2)
        ldtp.settextvalue(window, 'txtusername', 'user@example.com')
        ldtp.click(window, 'btnOK')
==========

Everything works fine, except the button click:

==========
Traceback (most recent call last):
  • File "/media/Data/src/bzr/accounts-sso/signon-ui/trunk/tests/signon-ui-test.py", line 48 in username_query_dialog
    ldtp.click(window, 'btnOK')
  • File "/usr/lib/python2.7/dist-packages/ldtp/client.py", line 54 in __call__
    return self.__send(self.__name, args)
  • File "/usr/lib/python2.7/xmlrpclib.py", line 1578 in __request
    verbose=self.__verbose
  • File "/usr/lib/python2.7/dist-packages/ldtp/client.py", line 100 in request
    raise LdtpExecutionError(e.faultString.encode('utf-8'))
ldtp.client_exception.LdtpExecutionError: Object does not have a "(click|press|activate)" action
==========

This is because the button action is called "Press" in Qt.
I'm attaching a simple patch which fixes the problem.
Comment 1 Nagappan Alagappan 2012-01-18 19:49:34 UTC
Thanks for the bug report and patch, fixed in git head.
Comment 2 Nagappan Alagappan 2012-01-18 19:50:09 UTC
Review of attachment 205522 [details] [review]:

LGTM