Attempting to get SilverlightApp Results in TimeoutException

7 posts, 0 answers
  1. Steven Raybell
    Steven Raybell avatar
    9 posts
    Member since:
    Apr 2010

    Posted 15 Jul 2010 Link to this post

    Hey all,

    I'm currently experiencing an issue where when attempting to get the SilverlightApp, the automation experiences a Timeout.  I've tried changing security settings as per instructions for setting up for WebAii, I've tried running as admin, impersonation, the works.

    I can access HTML elements without issue, however, when attempting to get the app, it finds the element (as reflected by debugging) for the Silverlight object, but the app reference fails return.  Increasing the timeout only results in the exception coming later and does not improve the situation.

    The code here:

                this.Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true, System.Diagnostics.ProcessWindowStyle.Maximized);
                this.ActiveBrowser.NavigateTo("https://ourwebsite/OurAppLocation/");

                SilverlightAppsList appsList = this.ActiveBrowser.SilverlightApps();
                SilverlightApp app = appsList[0];

    results in the exception on the last line.

    I've tried other .NavigateTo()+ overloads as well, without success.  Interestingly, this happens on my machine, by not my coworkers'.  Another coworker is continually having issues getting an initial action from the navigation process to work, even after modifying the security settings for IE.  We have yet to find a common problem here, other than WebAii is having a very difficult time getting the application handles, be it browser, or the SilverlightApp.

    Perhaps we're missing something vital?

    My machine configuration:

    - Visual Studio 2010 Ultimate
    - Server 2003
    - IE 7
    - Default Template (VSUnit)

    At this rate, we've invested so much time, with little yield, we're becoming somewhat disenchanted.  Any help to get us on track ASAP would be most beneficial.  I'm trying this on another machine and will report back if the same results are observed there.
  2. Missing user
    Missing user avatar

    Posted 15 Jul 2010 Link to this post

    Hello Steven,

    Please make sure that the EnableSilverlight flag is set to true in the settings object in

    MyTestInitialize() as in:

    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));

    Also, please check out the attached document for more options to try to connect to your Silverlight app.

    The mention of the out of browser Silverlight incomparability in the document may no longer apply in the new framework version, so please ignore that for now while I confirm that it is no longer an issue.

    Regards,
    Nelson Sin
    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
  3. Steven Raybell
    Steven Raybell avatar
    9 posts
    Member since:
    Apr 2010

    Posted 16 Jul 2010 Link to this post

    Thanks!  I could have sworn I had that property set, but at least this solved my local issue.

    This has lead me to a new issue, however.  We're noticing that due to the fact that we need to run with protected mode off, we have the infobar, which results in the clickable points to be shifted inappropriately from where the visible UI is.  That is to say, it's as if the automation framework is moving to where it would be if the infobar wasn't there, as opposed to moving to where the controls are really at.

    I'm not sure if this is an issue with UIA/MSAA or WebAii.  Some inspection leads me to believe that WebAii is doing things in an non-typical way, which is leading to this issue.

    We're also still seeing issues with browser navigation issues on some machines, regardless of settings.  In other solutions, we're still seeing timeouts, so we'll dive deeper there.

    Additionally, the framework needs vast improvement in this area overall.  Fracture API stacks, non-shared API surfaces between Silverlight and HTML (which should be possible), and generally bad exceptions.  For instance, in my situation, it should have immediately thrown if EnableSilverlight was false.  Instead, it just fails to get a handle to the application.  This just blows my mind that an API would behave this way.

    At this point, due to the compounding issues we're suffering through, it's possible that we'll be abandoning WebAii as our automation foundation.  The time lost investigating these issues due to poor exception information and a somewhat self-inconsistent design has been immensely frustrating for my team.

    That said, I appreciate the quick response.
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 21 Jul 2010 Link to this post

    Hi Steven Raybell,

    I am sorry to hear you're having so much trouble. You should be able to get rid of the infobar by adding your website into the list of trusted websites. What does the infobar say when it appears?

    Best wishes,
    Cody
    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
  5. Steven Raybell
    Steven Raybell avatar
    9 posts
    Member since:
    Apr 2010

    Posted 23 Jul 2010 Link to this post

    Thanks for the response!

    We've made some headway thus far, but we're still getting some inconsistent results where we're noticing that the browser yields a timeout.  We've gotten around the infobar issue (hiding it, etc.), but now, for reasons I can't yet explain, we're unable to get a handle to the browser window.  We either get a wait timeout exception (we're set to 60,000ms), or this exception:

    --------------------------- ---------------------------
    System.NullReferenceException: Object reference not set to an instance of an object. at ArtOfTest.WebAii.Messaging.Process.BrowserRemoteClient.Connect(BrowserType type, String version, IntPtr hwnd, Boolean isUILess, Boolean isDialog) --------------------------- OK ---------------------------

    Any ideas on this one?

    Oddly, this was working fine just minutes ago, but now I can't get it to grab a handle to the browser.
  6. Kiran
    Kiran avatar
    56 posts
    Member since:
    Dec 2008

    Posted 24 Jul 2010 Link to this post

    Hi Steven,

    Can you check the below url
    http://www.artoftest.com/support/webaii/topicsindex.aspx?topic=config_srvr
    I dont know whether you tried this.

    Thanks
    Kiran
  7. Steven Raybell
    Steven Raybell avatar
    9 posts
    Member since:
    Apr 2010

    Posted 26 Jul 2010 Link to this post

    I'll have my coworker give this a shot.  This however is already configured as such for my machine as I've used other frameworks with similar restrictions.

    Thanks, though!
Back to Top