[LDTP-Dev] my gpdf script is not working at ldtp 0.2.1

Mauricio Lin mauriciolin at gmail.com
Thu Nov 10 06:12:29 PST 2005


Hi Premkumar,

On 11/10/05, Premkumar Jothimani <prem.jothimani at gmail.com> wrote:
>
> Hi Mauricio Lin
>
> I tried with the files you sent. I could not reproduce the problem. I
> could open 9 windows with your script. I am on SUSE 10 machine.


Perhaps there is something wrong with my debian. I am not sure.

And I dont think the number of tries will matter and there must be timing
> issues which might actually cause the window to appear slowly. Also please
> check the file on which it is failing, may be try and open it manually. BTW,
> is the window open (corresponding to the file on which the script files)
> when u see the error ?


The error happens after you open the sixth window as you can see the output
I sent you on the first email.

# ./gpdf_1.py
0
1
2
3
4
5
Traceback (most recent call last):
File "./gpdf_1.py", line 16, in ?
selectmenuitem('frmPDFViewer', 'mnuFile;mnuOpen')
ldtp.error: Window: frmPDFViewer not opened

The number printed is just a counter in the for loop:

for i in range(0, len(files)):
selectmenuitem('frmPDFViewer', 'mnuFile;mnuOpen')
if waittillguiexist('dlgLoadfile'):
 click('dlgLoadfile', 'btnOpen')
wait(1)
selectrowindex('dlgLoadfile', 'tblFiles', i)
click('dlgLoadfile', 'btnOpen')
setcontext(title_name, files[i])
print i
wait(10)

But I had another solution. I changed the setccontext(title_name, files[i])
to setcontext(title_name,files[0]). So it works similarly in this way.

BR,

Mauricio Lin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20051110/0405b430/attachment.html


More information about the LDTP-dev mailing list