TimeoutException when lookup for Silverlight child window

4 posts, 1 answers
  1. Kristian Freed
    Kristian Freed avatar
    2 posts
    Member since:
    May 2010

    Posted 10 Aug 2010 Link to this post


    I'm trying to automate Silverlight child windows using the free WebAii automation framework (latest available official release). I'm using the popup tracker provided in the Telerik.WebUI.PopupTracker assembly shipped with this build to track my child window in my application, which works without any indication of an error. However, when I try to find my child window by using app.Find.ByAutomationId("MyDialogAutomationId") and various other variations on that theme, I get a TimeoutException.

    Is this a known issue, and if so, is there a workaround? Is there something else I have to do to make automation of Silverlight child windows possible?

  2. Answer
    Kiran avatar
    56 posts
    Member since:
    Dec 2008

    Posted 10 Aug 2010 Link to this post

    Hi Kristian,

    The childwindows and popups are in the App.Popups collection.

    You can try the below

    Button cancelButton = app.Popups.FirstOrDefault().VisualTree.Find.ByName<Button>("CancelButton");

    Refer the below for reference

  3. Cody
    Cody avatar
    3354 posts

    Posted 10 Aug 2010 Link to this post

    Hi Kristian Freed,

    Can you share with us your code you're using for your Silverlight automation? I also wonder if you enabled Silverlight in the settings object. For example:

    Settings settings = GetSettings();
    // Override the settings you want. For example:
    settings.EnableSilverlight = true;
    // Now call Initialize again with your updated settings object
    Initialize(settings, new TestContextWriteLine(this.TestContext.WriteLine));

    Kind regards,
    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
  4. Kristian Freed
    Kristian Freed avatar
    2 posts
    Member since:
    May 2010

    Posted 11 Aug 2010 Link to this post

    I didn't realize the child windows were in a separate collection, now that I look for them in the right place everything works as expected. Thank you!
Back to Top