开发者

UI test automation of Silverlight Navigation Applications

I am writing Silverlight UI test automation using this article as a guide: http://msmvps.com/blogs/theproblemsolver/archive/2009/01/26/unit-testing-in-silverlight-part-4-the-ui.aspx

It works for small Silverlight applications, but when I try to add to TestPanel a Silverlight Navigation Application, I get this exception: "Cannot find a Resource with the Name/Key LayoutRootGridStyle [Line: 10 Position: 37]". Here's the code:

[TestClass]
public class Tests : SilverlightTest
{
    private MainPage _myControl;

    [TestMethod]
    [Asynchronous]
    public void TestMethod1()
    {
        _myContr开发者_如何学运维ol = new MainPage(); // <-- exception
        TestPanel.Children.Add(_myControl);
    }
}


Is MainPage inherited from Page? If so, I think that TestPanel would need to define a Grid with the name "LayoutRoot".

Check out this link for another view of the same issue: http://silverlight.codeplex.com/workitem/8175

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜