How to use White to test OpenFileDialog on Silverlight 4.0 application?
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 开发者_如何学GoModalWindows()
collection on it.
Could someone please give me a hint as to what I'm doing wrong, & how I should be testing this?
viveksingh has provided the answer over on the White discussion forum:
have you tried finding the ModalWindow from InternetExplorerWindow object?
精彩评论