[LDTP-Dev] [Bug 668180] New: Click actions are not working with Qt

LDTP (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 18 05:07:24 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=668180
  LDTP | ldtp2 | 2.0.0

           Summary: Click actions are not working with Qt
    Classification: Other
           Product: LDTP
           Version: 2.0.0
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ldtp2
        AssignedTo: ldtp-dev at lists.freedesktop.org
        ReportedBy: mardy at users.sourceforge.net
         QAContact: ldtp-dev at lists.freedesktop.org
     GNOME version: ---


Created an attachment (id=205522)
 View: https://bugzilla.gnome.org/attachment.cgi?id=205522
 Review: https://bugzilla.gnome.org/review?bug=668180&attachment=205522

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 at 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.

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


More information about the LDTP-dev mailing list