[LDTP-Dev] how to slove the problem about chinese

Nagappan Alagappan nagappan at gmail.com
Mon Jul 27 12:43:03 PDT 2015


Hello,

What happens when you do something like this ?

for window in ldtp.getwindowlist():
  print window, ldtp.getobjectlist(window)

BTW what OS do you run this ? Whats the version of gnome/kde ?

Regards
Nagappan

On Thu, Jul 23, 2015 at 12:49 AM, 江芳 <fang.jiang at cs2c.com.cn> wrote:

> Hi,
>     when the window name is chinese, I use getobjectlist() of LDTP
> ,display error:
>
>  ldtp.getobjectlist('frm桌面')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/site-packages/ldtp/client.py", line 70, in
> __call__
>     return self.__send(self.__name, args)
>   File "/usr/lib64/python2.7/xmlrpclib.py", line 1578, in __request
>     verbose=self.__verbose
>   File "/usr/lib/python2.7/site-packages/ldtp/client.py", line 190, in
> request
>     raise LdtpExecutionError(e.faultString.encode('utf-8'))
> ldtp.client_exception.LdtpExecutionError: Unable to find window "frm桌面"
> >>> ldtp.getwindowlist()
> [u'frm\u4e0b\u65b9\u6269\u5c55\u8fb9\u7f18\u9762\u677f',
> u'frm\u684c\u9762', 'frmcs2c at localhost:~']
> >>> ldtp.getobjectlist(u'frm\u684c\u9762')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/site-packages/ldtp/client.py", line 70, in
> __call__
>     return self.__send(self.__name, args)
>   File "/usr/lib64/python2.7/xmlrpclib.py", line 1578, in __request
>     verbose=self.__verbose
>   File "/usr/lib/python2.7/site-packages/ldtp/client.py", line 190, in
> request
>     raise LdtpExecutionError(e.faultString.encode('utf-8'))
> ldtp.client_exception.LdtpExecutionError: Unable to find window "frm桌面"
>
> The window name is got by using  getwindowlist(),please how to solve the
> problem?
>
>
>
>
>


-- 
Cross platform GUI testing
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra
ATOMac - Mac GUI Automation tool - https://github.com/pyatom/pyatom
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20150727/a757230c/attachment.html>


More information about the LDTP-dev mailing list