Newbie (to White) questions

Jul 18, 2008 at 1:37 PM
I am new to this tool (just found it a couple days ago) and I am reviewing it to see if we can replace our existing automation tool.  Our application will be written in WPF with some WIN32 and WinForms screens just to make it fun.  I have been the lead automation developer for 10 years so I am not new to automation, just this tool.  Because of time limits I am hoping to get some help with the following questions.

1) Can wild cards be used when looking for a window name. Our app uses the same dialog for "Create Entity" as it does for "Modify Entity".  Is there a way to say Look for "* Entity" or a way to say "Create Entity" or "Modify Entity" when looking for the window.

2) We have some wizards that display different screens based on options selected.  In one case we may get screens 1,2,3,4,5 and in another run we may get screens 1,2,4,6,7.  Because we don't know what screens will appear is there a way to get the active window.

3) Depending on the amount of data in our app, some screens / processes can take an hour or more to complete.  During this time we may get error messages that pop-up.  Is there a way to wait for the process to complete and check for, record and clear error messages?  In our existing tools we will wait for a message box stating the process is done, while waiting for it, we check to see if there are any other message boxes displayed.  Sometimes these will kill the process other times they are just a reminder / warning.

4) Has anyone tried to use white and "talk" to a remote computer?  Our current tools can be used to control a remote system so I don't have to install the application under test on our automation development machines.  We also use this to do some multi user tests to sync the systems to perform a task at the same time etc.

Jul 20, 2008 at 6:12 PM
Thanks for your questions. I dont know white answers all these questions the way you want them to or not.
1. Since you can do application.GetWindows().Find(...pass your delegate...), you can implement this yourself. I am noting this down as something which can be provided directly in Application class API.
2. Again you can use application.GetWindows, this would only return you windows which are present on screen. For this one and above you can write small wrapper around application class to do this. Let me know if I can help further here.
3. You can use the window.WaitTill method, you might also have to increase the BusyTimeout. Again here you can pass the delegate which do the hard work for checking if there are any messageboxes or modal windows. Here I think White should have some methods using which it should give a list of all child windows for a window, which isn't there at this point.
4. No. I dont think this would work at this point.
Nov 9, 2008 at 12:36 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Oct 29, 2010 at 5:16 AM

Hello, I am new to white as well and I was searching for Item #1 on the above list.  Has this issue been addressed?  I am looking to use a wild card as well in strings.  I have a window where part of the name is dynamice (ie. New Page (3)).  I want to be able to identify it with "New Page".  I can't use the method "contains" so was hoping to use a wild card if available.   Thanks.

Oct 29, 2010 at 7:08 AM


there is no need to implement something in White.


Try the following if you look for a window


=> Window window = application.GetWindows().Where(p=>p.Name.Contains("New Page").First();