[LDTP-Dev] help me with initappmap !!!

Nagappan anagappan at novell.com
Mon Apr 10 22:23:17 PDT 2006


Hi Harishankaran,
    Are you using latest LDTP ?

cvs -d :pserver:anoncvs at cvs.freedesktop.org:/cvs/ldtp co ldtp

If latest one then you no need to use initappmap. At run time all the
object info are recognized. Its optional to use this function. I guess
in your case LDTP engine has been started in a different directory. When
you do initappmap with current working directory the LDTP engine could
not find, as the CWD of LDTP engine will be pointing to a different
directory. I would recommend to use the absolute path as an argument to
initappmap.

In script you can have something like this:

import os
initappmap (os.getcwdu () + '/gnome-dictionary.map')

Thanks
Nagappan

Harishankaran. wrote:
> hi,
>
> This is the code snippet from my python script 
>
> from ldtp import *
> import string, sys, os
> from ldtputils import *
> appmap_path = ''
>
> if os.access ('./gnome-dictionary.map', os.F_OK | os.R_OK) == 0:
> 	print 'Appmap path missing'
> 	sys.exit(0);
> else:
> 	print "Correct Appmap"
> initappmap ('./gnome-dictionary.map')
>
> Here first i have checked whether the file is readable by using access and that
> check is passed but initappmap fails :-( .
> The error displayed is 
>
> hari at nosip:~/LDTPstuff/pyautosuite/gnome-dictionary> python gnome-dictionary.py
> Correct Appmap
> initappmap ( ( ./gnome-dictionary.map )
> *** Unable to open appmap file
> Traceback (most recent call last):
>   File "gnome-dictionary.py", line 13, in ?
>     initappmap ('./gnome-dictionary.map')
>   File "/usr/lib/python2.4/site-packages/ldtp.py", line 1553, in initappmap
>     raise LdtpExecutionError (str (msg))
> ldtp.LdtpExecutionError: "'initappmap failed'"
> hari at nosip:~/LDTPstuff/pyautosuite/gnome-dictionary>
>
> Can anyone help me with this problem .
>
> Thanks in advance 
>
> -------------------------------------------------
> This mail sent through IMP(http://www.nitt.edu)
> _______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
>   

-- 
Nagappan A <anagappan at novell.com>
Novell Software Development (I) Pvt. Ltd.
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com/

Novell, Inc.
Software for the Open Enterprise
www.novell.com/open 



More information about the LDTP-dev mailing list