[LDTP-Dev] Re: Navigate through the folder and open a file later

Nagappan anagappan at novell.com
Thu Oct 27 22:21:49 PDT 2005


Hi Mauricio,
    Comments inline.

Thanks
Nagappan

Mauricio Lin wrote:
> Hi all,
>
> I solved my problem. I had to change the wrong 'dlgLoadFile' to 
> 'dlgLoadfile'.
>
Thats great :) Its case sensitive, We will try to remove the barrier.
> Between the first click('dlgLoadfile', 'btnOpen') action and the 
> second one, I had to put a time.sleep() or wait() function.
>
> BTW is there any fancy function instead of using time.sleep() or 
> wait() function?
>
wait function in ldtputils.py internally calls time.sleep, so 
difference. Its a convention followed in 
http://safsdev.sourceforge.net/sqabasic2000/RRAFSQuickReference.htm
> BR,
>
> Mauricio Lin.
>
> On 10/27/05, *Mauricio Lin* <mauriciolin at gmail.com 
> <mailto:mauriciolin at gmail.com>> wrote:
>
>     Hi all,
>
>     I am trying to open a file in gpdf application.
>
>     I mean I start the gpdf and open the "load file" dialog and after
>     that I select the folder and click the open button, so the pdf
>     files inside the folder are displayed in the "load file" dialog,
>     but I cannot open the pdf file.
>
>     Code below
>     **************************************************
>     from ldtp import *
>     from ldtputils import *
>     import sys, string, os, time
>
>     initappmap('%s/gpdf.map' % os.getcwd())
>
>     launchapp('gpdf')
>
>     selectmenuitem ('frmPDFViewer', 'mnuFile;mnuOpen')
>
>     if waittillguiexist('dlgLoadfile'):
>         click('dlgLoadfile', 'btnOpen')                  #open the folder
>         if guiexist('dlgLoadfile'):
>             click('dlgLoadFile', 'btnOpen')          #open the file
>     inside the folder, but an error is generated
>     **************************************************
>     Here is the error message:
>
>     Traceback (most recent call last):
>       File "./gpdf.py", line 16, in ?
>         click('dlgLoadFile', 'btnOpen')
>     ldtp.error: Unable to get gui handle ldtp.c 494
>
>
>     Does anyone know what is going on? How can I solve it?
>
>     BR,
>
>     Mauricio Lin.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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://gnomebangalore.org/ldtp/index.php/Main_Page
http://nagappanal.blogspot.com/



More information about the Ldtp-dev mailing list