[LDTP-Dev] Launch application in specific locale?

Andre Klapper ak-47 at gmx.net
Thu Jan 5 09:09:46 PST 2012


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



More information about the LDTP-dev mailing list