Find by automationId problem

6 posts, 0 answers
  1. Larry
    Larry avatar
    4 posts
    Member since:
    May 2011

    Posted 26 May 2011 Link to this post

    Hey all,

    I'm running webaii against a silverlight 4 application and I'm seeing a weird case where my testing framework hangs trying to find a FrameworkElement by automationId.  My test basically looks like this.

    try
    {
    string automationID = "MyAutomationID";
    Console.WriteLine("Find the element by automation ID");
    FrameworkElement element = Application.Find.ByAutomationId(automationID);
    Console.WriteLine("Found element");
    }
    catch (Exception e)
    {
    Console.WriteLine("Caught Exception: " + e.Message);
    }

    I can see the log before the find but I don't see the log after and I don't see the log from the catch.  This doesn't seem to happen all the time and seems to be an intermittent failure.  I have three different test boxes that run against different browsers and this issue only happens on the test box that runs against Internet Explorer.  Eventually the MSTest framework hits its timeout and the tests move on.  Have you heard of any failure like this?  Do you have an idea on what might be "hanging"?  Let me know what info you might need to help discover the problem.

    Thanks!
  2. Larry
    Larry avatar
    4 posts
    Member since:
    May 2011

    Posted 26 May 2011 Link to this post

    Quick update.  I actually seen this fail on my FireFox tests as well so it's not specific to IE.  One thought I had, if our application tossed an exception at the right time, would that cause webaii to appear as if it hung? 
  3. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 31 May 2011 Link to this post

    Hello Larry,

    This is an interesting report. It makes more sense it would happen on all browsers rather than just one specific browser (since Silverlight has its own run time engine that runs independent of the browser).

    At this point now we can't think of any possible way that the Find.ByAutomationId could hang as you describe. Not even if your application throws an exception. No matter what we should either time-out or return. We have put in so many error catching that it should be impossible for it to hang and not time out like that.

    Is there anyway you can help us repro this problem?

    All the best,
    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
  4. Larry
    Larry avatar
    4 posts
    Member since:
    May 2011

    Posted 01 Jun 2011 Link to this post

    I'm not sure there's a way to replicate the problem unless you completely setup a similar environment.  I could maybe describe what our app and testing framework is doing at the time we see the issue?
  5. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 08 Jun 2011 Link to this post

    Hi Larry,
       it's going to be extremely difficult getting a repro like that.

    Instead would it be possible for you to give us the test in questions and allow us to run it against your app? This mean that you'll have to grant the the necessary rights to access to app.

    Greetings,
    Stoich
    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
  6. Larry
    Larry avatar
    4 posts
    Member since:
    May 2011

    Posted 08 Jun 2011 Link to this post

    I can't give access to our app.  But we have seemed to fixed the problem....although I don't fully understand the reason.

    In our testing framework we use Visual Studio's class TestContext to write out our logs.  We put a bunch of TestContext.writelines in our framework to help debug problems, this coincides with the time frame of our tests stalling.  We replaced the TestContext.writelines with Console.writelines and we no longer see this problem occurring.
Back to Top