No Silverlight apps? ("index '0' is invalid. List contains ony '0' apps")

2 posts, 0 answers
  1. Richard Grimmer
    Richard Grimmer avatar
    13 posts
    Member since:
    Feb 2006

    Posted 12 Oct 2010 Link to this post

    Hi guys,
    OK, so I've given up attempting to use the test recorder - it seems to be just too flaky for any costructive use, so I've gone back to manually coding up tests, and have run into yet another problem....

    We have a standard web app using frames. In one frame we have a "Dashboard" and in another we have a menu - both of which are silverlight controls. There are also several "preceding" frames which just contain normal html. I'm able to drive the login portion of our app correctly and log in to the sysytem, but when using the following code, I'm consistently getting the error mentioned in the title:

                HtmlAnchor a = this.manager.ActiveBrowser.Find.ByContent<HtmlAnchor>("LoginLink");
                if (null != a)

                // 0 in list...
                SilverlightApp app = this.manager.ActiveBrowser.SilverlightApps()[0];

    Any ideas? I'm guessing that it's due to the additional frames - I've managed to get the following:

                Browser b = this.manager.ActiveBrowser.Frames["Menu"];

    To work, but the returned Browser object seems not to be quite the same as a "normal" browser, and so still can't find any SL apps...

  2. Cody
    Cody avatar
    3354 posts

    Posted 13 Oct 2010 Link to this post

    Hi Richard Grimmer,

    It is very common (but not always true) for the Silverlight app to be contained within a frame. If this is the case you need code like this to get the Silverlight app:

    SilverlightApp app = this.manager.ActiveBrowser.Frames[0].SilverlightApps()[0];

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top