Hi, I have a question.
Sometimes my test cases pass, but sometimes my test cases fail due to the following error.
System.TimeoutException: Wait for condition has timed out
I believe it is the network speed issue. I would like to customize the error message, but I find it seems not possible for me to do it. Is it possible for me to know which step or line throws this exception? I can increase the sleep time.
Thanks,
Ray
4 Answers, 1 is accepted
In what way do you want to customize the error message? If you know which step is failing you can enter any text you want in the LogMessageOnFailure property. The text you enter in this property will be added to the log if/when that step fails.
Greetings,
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.

Thanks,
Ray

I find most of the test cases fail due to the following error even I set the sleep time longer. Some test cases don't have this issue.
Any idea?? :)
Thanks,
Ray
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr, Boolean waitOnElement, Int32 timeout)
at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr)
at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](XamlFindExpression expr)
at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](String[] clauses)
The LogMessageOnFailure is a test step property. You can see it in the logmessageonfailureqa screenshot. When you run the test via MSTest you can see your custom message in the output log as shown in the logmessageonfailuretestresults screenshot.
No I'm sorry I don't have any ideas regarding the CheckResult. I'd have to see your application and your test before I can figure out what's going on. Do you want to show it to me via GoToMeeting? Let me know what timezone you are in and your availability and I'll setup the meeting. I'm located in Austin, TX which is Central Daylight Time (GMT -6).
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.