This project is read-only.

How to check if a new page was opened

Jan 17, 2012 at 8:39 AM


I need to write an automated test using white, that, at some point, needs to check if a confirmation page was opened when clicking a button.

It is a standalone page that in c# code is opened using form.showdialog(). I need to Assert if the page opens, if not the test should fail. The other thing is, that if it doesn't open then an error message is shown.

How do you think I should approach this?

I have just started with white and it is a relatively new thing in our company so I am having a hard time trying to do some things.

Any help would be much appreciated. I should also mention that I come from development so I know c# syntax but I can't figure this thing out

Jan 17, 2012 at 12:16 PM

the page is a new window?

than use the Application.GetWindows() operation and search here for the expected Window.

if not use the above tools and show us what elements can be found.


Some Help:

  1. use UIAVerify(CodePlex) or UISpy(microsoft) to see relevant information about the UI.
  2. add configuration to appconfig of your test solution to be able to change wait times. (see configuration)
  3. add log4net for better white logging (see link above)

Hope that helps


Jan 27, 2012 at 9:00 AM

Thondorin thanks, used window.Get() to get it.