[LDTP-Dev] About waittillguiexist() function

Nagappan anagappan at novell.com
Sun Nov 27 21:51:33 PST 2005


Hi Mauricio,
    waittillguiexist function will wait till maximum of 30 seconds or 
till the window appears. In either case, the function will return. The 
sleep duration is in nano seconds. In your example, the control from 
waittillguiexist function returns immediately after the window appears. 
But by that time, the control inside the window are not ready. I mean 
the object property inside the new window are not ready. Thats the 
reason why you are getting this failure. The wait command can be used to 
overcome this situation. This can't be handled in waittillguiexist 
function, because the wait delay depends on the system load. On a slow 
system, this wait time should be increased more...

Thanks
Nagappan

Mauricio Lin wrote:
> Hi all,
>
> I ha used waittillguiexist() function often and I noticed a strange 
> behaviour after testing this function many times.
>
> Look the snippet of code:
>
> if waittillguiexist('dlgLoadfile'):
>         selectrow('dlgLoadfile', 'tblFiles', 'pdf_files')
>         ...
>
> This code works, but sometimes it fails and the following message is 
> displayed on my terminal:
>
> Traceback (most recent call last):
>   File "./gpdf_1.py", line 18, in ?
>     selectrow('dlgLoadfile', 'tblFiles', 'pdf_files')
> ldtp.error: unknown - not yet implemented ldtp.c 714 command: 234
>
> So if I change the code as:
>
> if waittillguiexist('dlgLoadfile'):
>     wait(1)
>     selectrow('dlgLoadfile', 'tblFiles', 'pdf_files')
>     ...
>
> It works without error. I guess even waittillguiexist() waits for the 
> window, sometimes it is not able to wait enough for the window to appear.
>
> Is it normal?
>
> 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