[LDTP-Dev] Launch application in specific locale?
Nagappan Alagappan
nagappan at gmail.com
Fri Jan 6 10:34:50 PST 2012
Hi Andre,
On Fedora 16, I tried like this:
launchapp('gedit', lang = 'de_DE')
it worked as expected. I haven't used setlocale. Can you please verify the
above and see it works in your environment ?
I haven't implemented bindtext api in LDTPv2, I should update the doc :-)
Thanks
Nagappan
On Thu, Jan 5, 2012 at 9:09 AM, Andre Klapper <ak-47 at gmx.net> wrote:
> Hi,
>
> using ldtp-2.2.0-4.1.i386 on Fedora 16 I am trying to launch an
> application in a specific locale. Obviously using "setlocale" is not
> enough. Trying to use "bindtext", I get the error
> NameError: name 'bindtext' is not defined
>
> http://lists.freedesktop.org/archives/ldtp-dev/2009-October/000923.html
> implies that there is currently no option in LDTP2 to pass a locale to
> an application to launch. Am I right with that assumption, and if so are
> there plans to implement this?
> My rough testcode (for GNOME's "gedit") is pasted below.
>
> Thanks,
> andre
>
>
> ---snip---
>
> #!/usr/bin/python
> from ldtp import *
> LANGS = ['cs_CZ', 'de_DE', 'fr_FR'] # format must be xx_XX
> for item in LANGS:
> LOCALENAME = (item + '.utf8')
> print "Locale is set to: "
> print LOCALENAME
> setlocale (LOCALENAME)
> # bindtext('gedit', '/usr/share/locale')
> time.sleep (3)
> APPWINDOWNAME = '*gedit'
> launchapp('gedit')
> time.sleep (3)
> if waittillguiexist (APPWINDOWNAME) == 0:
> raise LdtpExecutionError ('App window does not exist')
> print "App window exists."
> time.sleep (3)
> selectmenuitem ('*gedit', 'mnuFile;mnuQuit') #quit
> print "App window closed."
> time.sleep (3)
>
>
> --
> mailto:ak-47 at gmx.net | failed
> http://blogs.gnome.org/aklapper
>
> _______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
>
--
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20120106/0aef0fc4/attachment.htm>
More information about the LDTP-dev
mailing list