Completed
Last Updated: 16 Aug 2013 14:05 by ADMIN
ADMIN
Cody
Created on: 22 Feb 2013 21:57
Type: Bug Report
0
Silverlight test errors out with Wait for condition has timed out
Customer has a Silverlight application. The login page is using a hyperlink for the login. When you playback a fresh recording of the login sequence it errors out with:
System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   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.Silverlight.VisualWait.ForNoMotion(Int32 initialWait, Int32 motionCheckInterval, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForNoMotionIfNeeded(AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

Test Studio records a click on the TextBlock element contained in the hyperlink, which may be part of the problem. A HyperLink element actually has 2 TextBlock elements contained under it. 1 is visible and the other is not. If Test Studio is finding the incorrect one this may be the cause of this problem.

Customer is using a workaround of finding the parent HyperLink element in the visual tree and having Test Studio click on it instead. It's a cumbersom work around, but usable. This workaround shouldn't be necessary however.
Attached Files:
2 comments
ADMIN
Shtilianov
Posted on: 16 Aug 2013 14:05
The changes its visibility state when being hovered. That means when we execute the test and the mouse is not accidentally on top of the element it will be not visible. The executions waits for element to be visible in order to perform the click operation.
ADMIN
Konstantin Petkov
Posted on: 26 Feb 2013 08:00
The problem is the default recorded element isn't useful in this specific customer application. An easy work-around is to update the find logic so that Test Studio can click on the button on playback - see the attached image for details.