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

Mauricio Lin mauriciolin at gmail.com
Thu Oct 27 13:59:35 PDT 2005


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/e5b9573c/attachment.html


More information about the Ldtp-dev mailing list