[LDTP-Dev] Re: Navigate through the folder and open a file later
Mauricio Lin
mauriciolin at gmail.com
Thu Oct 27 14:53:37 PDT 2005
Hi all,
I solved my problem. I had to change the wrong 'dlgLoadFile' to
'dlgLoadfile'.
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?
BR,
Mauricio Lin.
On 10/27/05, Mauricio Lin <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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20051027/b74a5a32/attachment.html
More information about the Ldtp-dev
mailing list