Hi Nagappan, Thanks for the quick fix and the time :)<br><br><div class="gmail_quote">On Tue, Nov 17, 2009 at 2:11 PM, Nagappan Alagappan <span dir="ltr"><<a href="mailto:nagappan@gmail.com">nagappan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Scott,<br><br>Have fixed this issue in git. Thanks for reporting this issue.<br><br>Thanks<br>
<font color="#888888">Nagappan<br><br></font><div class="gmail_quote"><div><div></div><div class="h5">On Sun, Nov 15, 2009 at 2:12 AM, Wang Qi, Scott <span dir="ltr"><<a href="mailto:wangqi.s@gmail.com" target="_blank">wangqi.s@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi <span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(68, 68, 68);">Nagappan,</span><div>
<font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;"><br>
</span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">I want to make use of <span style="font-size: 13px;">onwindowcreate() and removecallback() to accomplish a usage as such:</span></span></font></div>
<div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;"><br></span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">1) I register a callback using onwindowcreate() just before I invoke a menu operation for my application under test (AUT).</span></font></div>
<div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">2) Then, I invoke the menu</span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">2.1) If the pop-up does occur, the call back is triggered.</span></font></div>
<div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">3) After the menu operations, I remove the callback using removecallback (). As the pop-up has a quite generic name, the action in the callback is only meant to be valid for this particular menu.</span></font></div>
<div><span style="font-family: arial,sans-serif; border-collapse: collapse; color: rgb(68, 68, 68);">4) Perform other operations...</span></div>
<div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">5) At last, the whole test case finishes.</span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;"><br>
</span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;">But in my code, at step 3) I get this exceptions as below. </span></font></div>
<div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;"><br></span></font></div><div><font color="#444444" face="arial, sans-serif"><span style="border-collapse: collapse;"><div>
Traceback (most recent call last):</div><div> File "/usr/local/lib/python2.6/dist-packages/mago/cmd/runner.py", line 95, in run</div><div> self._run(loggerclass, setup_once)</div><div> File "/usr/local/lib/python2.6/dist-packages/mago/cmd/runner.py", line 122, in _run</div>
<div> self.suite.setup()</div><div> File "/home/qwang12/tl/src/QA/AutoTest/TestCode/guiauto/ldtpsrc/trinitylake_testsuites.py", line 78, in setup</div><div> super(BldkDefaultConfTestSuite, self).setup()</div>
<div> File "/home/qwang12/tl/src/QA/AutoTest/TestCode/guiauto/ldtpsrc/trinitylake_testsuites.py", line 26, in setup</div><div> self.application.open()</div><div> File "/home/qwang12/tl/src/QA/AutoTest/TestCode/guiauto/ldtpsrc/trinitylake.py", line 172, in open</div>
<div> ldtp.removecallback(self.UNEXPECTED_STALL_PROJECT_DLG_TITLE)</div><div> File "/var/lib/python-support/python2.6/ldtp.py", line 2019, in removecallback</div><div> _callbackFunctions [windowTitle][1].exit ()</div>
<div>AttributeError: 'int' object has no attribute 'exit'</div><div><br></div><div>I read the code in removecallback(), i save the below highlighted comments:</div><div><br></div><div><div> if _callbackFunctions.has_key (windowTitle):</div>
<div> <b># Exit last thread registered with same window title</b></div><div> _callbackFunctions [windowTitle][1].exit ()</div><div> # delete the previous instance</div><div><br></div><div>
My question is that why to "Exit last thread" in removecallback ()? </div><div><br></div><div>Thanks</div><div>Scott</div><div><br></div><div><br></div></div></span></font></div>
<br></div></div><div class="im">_______________________________________________<br>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org" target="_blank">LDTP-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br>
<br></div></blockquote></div><div><div></div><div class="h5"><br><br clear="all"><br>-- <br>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org" target="_blank">http://ldtp.freedesktop.org</a><br>
<a href="http://nagappanal.blogspot.com" target="_blank">http://nagappanal.blogspot.com</a><br>
</div></div></blockquote></div><br>