我正在尝试测试OpenFileDialog
当用户单击我的 Silverlight 4.0 应用程序中的按钮时创建的。根据常见问题解答,查找模式对话框的正确方法是:
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
但是,我正在使用White.WebBrowser.Silverlight.SilverlightDocument
该类测试 Silverlight 应用程序,该类似乎没有ModalWindows()
集合。
有人可以给我一个提示我做错了什么,以及我应该如何测试这个?