代码之家  ›  专栏  ›  技术社区  ›  Duncan Bayne

如何在Silverlight4.0应用程序上使用White测试OpenFileDialog?

  •  1
  • Duncan Bayne  · 技术社区  · 16 年前

    我想测试一个 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
    

    但是,我正在测试Silverlight应用程序,使用 White.WebBrowser.Silverlight.SilverlightDocument 类,它似乎没有 ModalWindows() 上面的集合。

    有人能告诉我我做错了什么,我应该如何测试这个吗?

    1 回复  |  直到 16 年前
        1
  •  0
  •   Duncan Bayne    16 年前

    viveksingh provided the answer 在白色论坛上:

    你有没有试过找到磨刀窗口? 从InternetExplorer窗口对象?

    推荐文章