I am in trouble and I hope one of you can help
I am building the test in Python but the language does not matter much.
here is my problem.
I run my test and sometime a window pops up that states "System Buzy, Please try again"
this is caused by an asynchronous process that my be running at times.
if this window is displayed then I need to run most of the test again, if it's not displayed then the test is complete and I only need to run my exit commands.
So how do I test for a window and not fail ?
can I somehow select the window and have it be more of an if then a fail ?
because as I said, if the window is not shown then the test passed.
I am thinking what I may need to do is use storeAllWindowNames ( variableName )
then loop the names and if I find the error window, select the window and if it states the system is buzy
restart the whole test.
is there a better way ?
Thanks in advance for any help you can give me.
Michael C
No one ?
Pretty please . . . . . . I would think someone has had a test case like this before.
I have never come across this situation, did you try your own suggestion? Were you successful in your approach?
~ Tarun K
I finally had more then 15 minutes at one time to work this out and it dd work about the way I wanted it to.
here is the Python code assocated. .... is the complete test on the page that I need to loop back thru.
for count in range(5):
.......
# check for message board window by seeling all windows.
windowArray = sel.get_all_window_names()
Window_name = u"Window_Name"
if windowArray[1] == Window_name:
print "System Busy try test again"
sel.select_window("Window_Name")
for i in range(60):
try:
if sel.is_element_present("B1"): break
except: pass
else: self.fail("time out")
try: self.failUnless(sel.is_text_present("ERROR!!! ... System is busy, please try again in a few seconds"))
except AssertionError, e: self.verificationErrors.append(str(e))
sel.click("B1")
sel.select_window("")
time.sleep(10 * count)
else:
print "System was not busy"
break
print count
#end loop here
if count == 4:
self.fail("ran 5 times and it was buzy")
time.sleep(1)
