3 Replies Last post: Sep 24, 2008 10:45 AM by Michael C Ford  
Michael C Ford Beginner 25 posts since
Jun 12, 2008
Currently Being Moderated

Sep 13, 2008 8:11 PM

Build a loop based on a window being present.

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"

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. 

h0w412d Beginner 22 posts since
May 14, 2008
Currently Being Moderated
1. Sep 23, 2008 5:23 PM in response to: Michael C Ford
Re: Build a loop based on a window being present.

have you tried the select_window method?

 

you can specify the new window by title, internal javascript name, or javascript variable

 

http://release.openqa.org/selenium-remote-control/0.9.2/doc/python/selenium.selenium-class.html#select_window

Rajasekhar Advanced 54 posts since
Aug 25, 2008
Currently Being Moderated
2. Sep 24, 2008 12:47 AM in response to: h0w412d
Re: Build a loop based on a window being present.

Hi,

If it is HTML Popup Window, you can use selectWindow Method.

I don't think it will be HTML window. It may be Javascript popup window(Like JS Alert or JS Confirmation)

If it is JS Alert or JS Confirmation, you can use isAlertPresent or isConfirmationPresent

 

Regards,

Rajasekhar.

More Like This

  • Retrieving data ...