Hi, Nagappan,<br><br>I spent more time on my issue. My workflow is as follows.<br><br>1) application is lauched and waittillguiexist()<br>2) perform tests<br>3) application is closed and waittillguinotexist() to wait for the app to quit completely.<br>
<br>Then mago tests is repeated for the above 3 steps. <br><br>On FC10 X64 and U8.10 IA32, LDTP will always trow a exception after step 3. It seems that when the application quit, somehow the LDTP backend also go unstable. But this case never occurs on Ubuntu 9.04. Do you happen to came across this kind of issue before?<br>
<br><br><br>Thank you for the time!<br>Scott<br><br>Btw, I just realized that I made a mistake in the following code
example. I should wait for a while to allow the gedit to quit
completely.<br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 4:01 PM, Wang Qi, Scott <span dir="ltr"><<a href="mailto:wangqi.s@gmail.com">wangqi.s@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 Nagappan,<br><br>I installed LDTP 1.7.1 (below URL) on Ubuntu 8.10 .<br><br><a href="http://download.opensuse.org/repositories/home:/anagappan/xUbuntu_8.10/" target="_blank">http://download.opensuse.org/repositories/home:/anagappan/xUbuntu_8.10/</a><br>
<br>I tried to run the below scripts on U8.10 after installation. I always found a exception after runing the smoke_ldtp() after the first round. Is the LDTP 1.7.1 tested intensively on U8.10?<br><br>Thanks<br>Scott<br><br>
~$ python ldtp_smoke_with_gedit.py <br>i is 0<br>GTK Accessibility Module initialized<br>i is 1<br>GTK Accessibility Module initialized<br><br>(gedit:16481): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed<br>
Traceback (most recent call last):<br> File "ldtp_smoke_with_gedit.py", line 30, in <module><br> smoke_ldtp()<br> File "ldtp_smoke_with_gedit.py", line 20, in smoke_ldtp<br> settextvalue(WNAME, 'txt1', 'hello world')<br>
File "/var/lib/python-support/python2.5/ldtp.py", line 858, in settextvalue<br> raise LdtpExecutionError (_responseStatus [1])<br>ldtplib.ldtplibutils.LdtpExecutionError: u'Window does not exist'<br>
<br><br><br><br><br><br># Below is the content for ldtp_smoke_with_gedit.py <br># This script will simply test the installation of LDTP and all<br># necessary components on a newly installed system.<br># 1) Close all all instances of gedit before calling this script<br>
# 2) This scripts works on Ubuntu 9.0.4. <br><br>from ldtp import *<br><br># Sometimes, '*gedit*' does not works.<br>WNAME = '*gedit'<br><br>def smoke_ldtp():<br><br> launchapp('gedit')<br> waittillguiexist(WNAME, guiTimeOut=3)<br>
<br> # On Ubuntu 9.0.4, the text area is named as 'txt1'. <br> # It could be 'txt0' or other value on other platform.<br> # Please use the inspection tool such as "accerciser"<br> # to check out.<br>
settextvalue(WNAME, 'txt1', 'hello world')<br><br> selectmenuitem(WNAME, 'mnuFile;mnuQuit')<br><br> waittillguiexist('dlgQuestion')<br><br> click('dlgQuestion', 'btnClosewithoutSaving')<br>
</blockquote><div> #waittillguinotexist(WNAME, guiTimeOut=5) # waittillguinotexist() will cause a time-out exception on FC10-X64 or Ubutun 8.10.<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>for i in xrange(10):<br> print "i is %d" %i<br> smoke_ldtp()<br><br><br>
</blockquote></div><br>