[LDTP-Dev] Simple python script is not working

Shaheed Shaik sshaik at novell.com
Thu Oct 20 21:10:02 PDT 2005


Hi Mauricio,

Check whether the window name you passed to 'selectmenuitem' or 'click'
is matching with the one in your 'gedit.map', if you are using latest
appmap module, it would have been generated as
'frmUnsavedDocument1-gedit'. If that is the case, your selectmenuitem
should be as follows,
selectmenuitem ('frmUnsavedDocument1-gedit', 'mnuFile;mnuOpen').

Also cross check whether the accessibility is enabled or not.

Cheers,
Shaheed.
  
>>> Mauricio Lin <mauriciolin at gmail.com> 10/20/05 8:37 pm >>> 
Hi all,

I have followed the instruction from
http://gnomebangalore.org/ldtp/index.php/How_to_create_Test_Scripts_for_PY-
LDTPin
order to create my simple script, but it is not working.

The error message is printed as follow:

Traceback (most recent call last):
File "teste.py", line 9, in ?
selectmenuitem ('gedit', 'mnuFile;mnuOpen')
ldtp.error: Unable to get gui handle ldtp.c 1236

This happens after I execute the python script.

**************************************************************
from ldtp import *
from ldtputils import *
import sys, string

initappmap('/home/mauricio/teste/gedit.map')

launchapp('gedit')

selectmenuitem ('gedit', 'mnuFile;mnuOpen')

click ('gedit', 'btnOpen')
**************************************************************

Any idea?

BR,

Mauricio Lin.



More information about the Ldtp-dev mailing list