Hi all,<br>
<br>
I solved my problem. I had to change the wrong 'dlgLoadFile' to 'dlgLoadfile'. <br>
<br>
Between the first click('dlgLoadfile', 'btnOpen') action and the second one, I had to put a time.sleep() or wait() function.<br>
<br>
BTW is there any fancy function instead of using time.sleep() or wait() function?<br><br>
BR,<br>
<br>
Mauricio Lin.<br>
<br><div><span class="gmail_quote">On 10/27/05, <b class="gmail_sendername">Mauricio Lin</b> <<a href="mailto:mauriciolin@gmail.com">mauriciolin@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I am trying to open a file in gpdf application.<br>
<br>
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.<br>
<br>
Code below<br>
**************************************************<br>
from ldtp import *<br>
from ldtputils import *<br>
import sys, string, os, time<br>
<br>
initappmap('%s/gpdf.map' % os.getcwd())<br>
<br>
launchapp('gpdf')<br>
<br>
selectmenuitem ('frmPDFViewer', 'mnuFile;mnuOpen')<br>
<br>
if waittillguiexist('dlgLoadfile'):<br>
click('dlgLoadfile',
'btnOpen')
#open the folder<br>
if guiexist('dlgLoadfile'):<br>
click('dlgLoadFile',
'btnOpen') #open
the file inside the folder, but an error is generated<br>
**************************************************<br>
Here is the error message:<br>
<br>
Traceback (most recent call last):<br>
File "./gpdf.py", line 16, in ?<br>
click('dlgLoadFile', 'btnOpen')<br>
ldtp.error: Unable to get gui handle ldtp.c 494<br>
<br>
<br>
Does anyone know what is going on? How can I solve it?<br>
<br>
BR,<br><span class="sg">
<br>
Mauricio Lin.<br>
</span></blockquote></div><br>