[LDTP-Dev] Error with settextvalue()

Nagappan Alagappan nalagappan at vmware.com
Mon Nov 28 11:22:36 PST 2011


Hi Alberto,

I'm not aware that QT app is accessible in Ubuntu. Can you please suggest
me the steps to setup ? Also the application name will be helpful.

Thanks
Nagappan

-----Original Message-----
From: ldtp-dev-bounces+nalagappan=vmware.com at lists.freedesktop.org
[mailto:ldtp-dev-bounces+nalagappan=vmware.com at lists.freedesktop.org] On
Behalf Of Alberto Mardegan
Sent: Monday, November 28, 2011 5:58 AM
To: ldtp-dev at lists.freedesktop.org
Subject: [LDTP-Dev] Error with settextvalue()

Hi all,
  I'm using mago and ldtp (running on Ubuntu Oneiric) to test a Qt
application.
A snippet from my test case:

=====
        window = 'dlgEnteryourusername'
        assert ldtp.waittillguiexist(window) == 1
        log.debug('Window appeared')
        log.debug('Objects: %s' % ldtp.getobjectlist(window))
        ldtp.wait(2)
        ldtp.settextvalue(window, 'txtusername', 'pippo') =====

Unfortunately, the last call fails with this error:

=====
Traceback (most recent call last):
  File
"/media/Data/src/bzr/accounts-sso/signon-ui/trunk/tests/signon-ui-test.py"
,
line 46, in username_query_dialog
    ldtp.settextvalue(window, 'txtusername', 'pippo')
  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 1575, 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: Failed to grab focus for [text
| username]
=====

The window name and the component name should be correct, because the
previous getobjectlist(window) call tells me that there's a widget called
"txtusername".

Also, setting the input field (it's a QLineEdit) with the accerciser tool
works fine.

Any idea of what could be wrong?

Ciao,
  Alberto
_______________________________________________
LDTP-dev mailing list
LDTP-dev at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev


More information about the LDTP-dev mailing list