This is a migrated thread and some comments may be shown as answers.

Find by automationId problem

5 Answers 139 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 1
Larry asked on 26 May 2011, 10:53 PM
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!

5 Answers, 1 is accepted

Sort by
0
Larry
Top achievements
Rank 1
answered on 27 May 2011, 12:50 AM
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? 
0
Cody
Telerik team
answered on 31 May 2011, 10:22 PM
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
0
Larry
Top achievements
Rank 1
answered on 01 Jun 2011, 10:44 PM
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?
0
Stoich
Telerik team
answered on 08 Jun 2011, 01:38 PM
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
0
Larry
Top achievements
Rank 1
answered on 08 Jun 2011, 10:31 PM
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.
Tags
General Discussions
Asked by
Larry
Top achievements
Rank 1
Answers by
Larry
Top achievements
Rank 1
Cody
Telerik team
Stoich
Telerik team
Share this question
or