How to use White to test OpenFileDialog on Silverlight 4.0 application?

Posted by Duncan Bayne on Stack Overflow See other posts from Stack Overflow or by Duncan Bayne
Published on 2010-03-15T05:36:06Z Indexed on 2010/03/15 5:39 UTC
Read the original article Hit count: 516

I'm trying to test an OpenFileDialog that is created when the user clicks on a button in my Silverlight 4.0 application. According to the FAQ, the correct way of finding modal dialogs is this:

Window mainWindow = application.GetWindow("main");
List<Window> modalWindows = mainWindow.ModalWindows(); //list of all the modal windows belong to the window.
Window childWindow = mainWindow.ModalWindow("child"); //modal window with title "child"
childWindow.IsModal; //returns true

However, I'm testing a Silverlight application, using the White.WebBrowser.Silverlight.SilverlightDocument class, which doesn't appear to have a ModalWindows() collection on it.

Could someone please give me a hint as to what I'm doing wrong, & how I should be testing this?

© Stack Overflow or respective owner

Related posts about silverlight-4.0

Related posts about white