[LDTP-Dev] Callback example raises exception.

Nagappan Alagappan nagappan at gmail.com
Sat Nov 14 20:41:34 PST 2009


Hi Scott,

Its a bug :) Have fixed it in git. The issue was the window name was not in
LDTP format. I think this has to be documented. Will fix these issues in
LDTPv2.

Thanks
Nagappan

On Sat, Nov 14, 2009 at 7:13 PM, Wang Qi, Scott <wangqi.s at gmail.com> wrote:

> Hi,
>
> I tried the callback example at
> http://ldtp.freedesktop.org/user-doc/index.html on Ubunt 9.04 with LDTP
> 1.7.1.
>
> It seems as soon as the first callback function 'cb' is triggered. It raise
> a exception.
>
> >>> onwindowcreate('Replace', cb)
> 1
> >>> onwindowcreate('dlgFind', cbwithvarargs, 'test', 'var', 'args')
> 1
> >>> click('*gedit', 'btnReplace')
> 1
> >>> Unhandled exception in thread started by <function invokecallback at
> 0xa4f087c>
> Traceback (most recent call last):
>   File "/var/lib/python-support/python2.6/ldtp.py", line 351, in
> invokecallback
>     callback = _callbackFunctions.get (_responseData [1])[0]
> TypeError: 'NoneType' object is unsubscriptable
>
> But the callback with arguments works just fine. Is this a bug?
>
> Another observation is that it seems the default gedit installed with
> Ubuntu 9.04 only allow a single dialog to be pop-up in front of main window.
>
>
> click('*gedit', 'btnReplace') # This will pop up the Replace dialog.
> click('*gedit', 'btnFind') # But this one only highlight the Find button.
>
> Therefore, this example may not work any more as intended originally.
>
> Thanks
> Scott
>
>
> _______________________________________________
> LDTP-dev mailing list
> LDTP-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ldtp-dev
>
>


-- 
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/ldtp-dev/attachments/20091114/ba5cd32e/attachment.htm 


More information about the LDTP-dev mailing list