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

Wait for condition has timed out error

26 Answers 794 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Svetlana
Top achievements
Rank 1
Svetlana asked on 04 Jun 2010, 03:11 PM
Hello,
Sometimes I get "time out" error on execution test's step which was successfully performed (as I can see from screenshot and directly in browser)

Error log:
ArtOfTest.Common.Design.Exceptions.ExecutionException: Wait for condition has timed out ---> System.TimeoutException: Wait for condition has timed out
   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.Core.Browser.WaitUntilReady()
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click(Boolean isClosing)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ClickActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
   --- End of inner exception stack trace ---

Step:
Click 'BtnLoginSubmit'

How could I avoid this error?




Niveditha
Top achievements
Rank 1
commented on 19 Nov 2022, 07:50 PM | edited

Hi Nelson, I get the same error, I gave wait time before this step but it still shows the same error. Here my error is near entering a date field

Exception thrown executing coded step: 'Enter text '10/1/2021' in 'ebirpStartDate''.
InnerException:
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,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Int32 timeout)
   at ArtOfTest.WebAii.Core.Browser.WaitForFrame(FrameInfo frameInfo, Int32 timeout)
   at ArtOfTest.WebAii.Core.Browser.WaitForFrame(FrameInfo frameInfo)
   at TestProject2.Pages.DataSummaryReportRIMS0Page.get_FrameFramecontent() in c:\Users\autotestuser\Documents\

Elena
Telerik team
commented on 22 Nov 2022, 02:59 PM

Hi Niveditha, 

Based on the error trace log I guess that the element used in the coded step is nested in a frame and it is the frame that cannot be located during the test run. You can check additional information about recording tests in application with frames in this article

In addition to that find out more about what properties has the iframe node in the Elements Explorer and how to handle dynamic frames

If you continue experience any issues, please, submit a new ticket as the forum post you refer to is over 10 years ago and probably the current case is not related to that discussed topic. To help me continue the investigation I will need the complete set of step failure details - these can be exported from the failure section, and the test files - these are 4 files in the Windows Explorer with the name of the test and different file extensions (*.tstest, *.tstest.cs, *.resx, *.imgstore). All resources can be sent zipped. 

Thank you for your understanding and cooperation in advance. 

Regards, 
Elena

Niveditha
Top achievements
Rank 1
commented on 22 Nov 2022, 11:10 PM

HI Elena, thank you for your reply.

I tried this Internet explorer and I see this issue. When I try with edge browser, I don't see that. Is this something browser specific.

I have one more question. For our project we are using Edge on IE mode for out testing... How do I configure Edge on IE mode in test studio. Is it possible to do like that in test studio.

Elena
Telerik team
commented on 24 Nov 2022, 01:48 PM

Hi Niveditha, 

The provided information is only based on the stack trace you shared. To be able to analyze the error further, I will need the complete failure details from the failing test run. Otherwise I can only share suggestions for what could be causing the misbehavior and if it is browser or application specific. 

As to your other question about Edge in compatibility mode - this is not a supported mode of the Edge browser in Test Studio tool. We support both IE and Edge browsers, so there is no need to use that mode of the newer browser to simulate the old one. 

I guess that you are testing any sort of legacy application, which runs only in IE. Ever since the IE browser was deprecated from Microsoft you probably use their recommended approach to simulate IE in the Edge compatibility mode.

From Test Studio perspective, though, you can continue using Internet Explorer - although it is out of support, there are operation systems where it will remain in place. You can check this blog post from Microsoft about the future of Internet Explorer browser. So you have the option to keep a machine with Test Studio and Internet Explorer (running on the listed platforms from the Microsoft blog post) and continue executing the tests as they are.

I hope that these notes help you sort out your doubts. Let me know if you have any follow up questions on the topics. 

Regards,
Elena

Niveditha
Top achievements
Rank 1
commented on 24 Nov 2022, 03:45 PM

Hi Elena,

Thank you, I understood what you are saying. But the problem here is I am able to execute the same script using Edge browser without any issues. But when I opt for Internet Explorer it always shows me some or the other error especially near frames and it is not stable. Not sure what’s the difference.

Yes, for our project we used to use Internet Explorer and since it is getting deprecated we are moving to Edge on IE11 mode.

Elena
Telerik team
commented on 28 Nov 2022, 11:28 AM

Hi Niveditha, 

I may have mixed up the provided information so here are some additional notes on the topics. 

The issue with a failing test 

So far I don't have any specifics details from the failing test - thus everything i can say on this topic are only assumptions. If it comes to difference in the execution between browsers, then probably the application is being rendered differently when running in Edge or IE. 

You can use the DevelopersTooling of each browser (press F12) to inspect the elements and frames in the application's DOM tree and compare these. If there are any sort of differences, probably the Test Studio elements' find expressions correspond to the application structure in Edge. This is why the test passes in that browser and fails in IE.

As a cross check you can try recording the same scenario in a new test using the IE browser and check if the elements added for that test are different than those used in the test which works in Edge. 

In any case, if you experience further issues with this test, my advice is to submit a private support ticket in which we can continue the discussion. In a private thread you will also have the confidence of exchanging detailed information securely. 

The deprecation of IE browser 

The important note here is that IE browser is not deprecated from Test Studio perspective and this is the recommended browser to use if the tested application runs only under IE. The option to use Edge browser in compatible mode is not supported in Test Studio solution. You can check this blog post for additional information on what platforms you can continue using the IE browser as it is and also continue running the Test Studio tests related to that legacy application. 

I hope that these additional notes on the two topics will help you sort out your issues.

Regards,
Elena

26 Answers, 1 is accepted

Sort by
0
Missing User
answered on 04 Jun 2010, 09:10 PM
Hello Svetlana,

Thanks for the post and I'm sorry you ran into this problem. You can try increasing the WaitOnElements Property for the test step in the Properties Window.

Alternatively, you can try adding a Execution Delay step from the '+ More...' Drop Down Menu. You can add this before the step that is timing out and increase the  Execution Delay Step's WaitTime as needed in the Properties Window.

All the best,
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.
0
Missing User
answered on 07 Jun 2010, 10:51 PM
Hi again Svetlana,

Just wanted to check back with you to see if any of the suggestions from my last post or anything you may have added stabilized the test step. Please let us know if you have any further questions on this.

Sincerely,
Nelson
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
Svetlana
Top achievements
Rank 1
answered on 08 Jun 2010, 09:11 AM
Hi Nelson,

Thank you for the help.

I've increased the 'WaitOnElements' and the problem has gone for a yesterday evening ... but now it reproduces again.
Could you, please, answer why "time out error" occurs when the step was already performed? I didn't understand it :(

Regards,
Svetlana
0
Missing User
answered on 08 Jun 2010, 05:33 PM
Hello again Svetlana,

So is it the same Click 'BtnLoginSubmit' test step that is timing out even after increasing the 'WaitOnElements' elements?

Or is it the test step after Click 'BtnLoginSubmit' that is failing?

Since it looks like you are clicking on a Submit Login Button, is a login form being submitted or another page being loaded? 

Please increasing 'WaitOnElements' more for the step that is failing and the next test step after as well. You can also try adding the Delay Steps before or after the failing test steps as needed.

If possible, please take a video of the test playback for us to check out as well. You can use Jing which is free to use.

Quick Edit: I forgot to mention, in the Test Lists Tab -> Edit Settings menu, there is an ExecuteCommandTimeout property you can increase also to see if this helps with the error also.

All the best,
Nelson
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
aadi kumar
Top achievements
Rank 1
answered on 09 Jun 2010, 08:01 AM
Hi Nelson

Greetings of the Day!

Unfortunately I have the same issue which 'Svetlana' is facing and I have the same question.

I will repeat the same question that aftre successfully clicking on 'BtnLoginSubmit' button why it shows failure for this step.

In my case I am trying to login to application and then verifying Heading on the home page.

Everytime execution is failing for 'Login' button but strange thing is it has already clicked on 'Login' button and loading the next page.

So question is if it has already clicked on the Login button then why it saying "Wait for condition has timed out "?

Most of the time I am getting this error but not able to understand the significance of this error.

~Thanks
Aadi
0
Svetlana
Top achievements
Rank 1
answered on 09 Jun 2010, 08:30 AM
Hi all,

Nelson I'm clicking on the 'SubmitLoginButton' in my test and Home page is being loaded, but I get time out error for the step with clicking the button action. This is strange. The issue is reproduced time after time so it will be difficult to capture it.

By the way, I've added 'Delay' step after step with clicking 'SubmitLoginButton'. It does not help, because the error occurs before 'wait time' or 'delay' are elapsed.

What is the measure of 'Wait on element timeout' value? Seems that it's neither milliseconds nor seconds....

Regards,
Svetlana
0
Missing User
answered on 09 Jun 2010, 09:28 PM
Hello Svetlana and Aadi,

So I tried reproducing this as best I could with Hotmail's html login page, but am not able to reproduce this error. Is there an example page somewhere online that is like your login pages?

And can check out the attached screenshot and reply back with which release version of WebUI you are using?

Please also try changing the 'SubmitLoginButton' test step's 'SimulateRealClick' property to true. If that does not work, please try changing the 'ClosesBrowser' property to true.

And if all else fails, if I can please setup a quick Live Meeting with one of you so that I can look at the problem to see what maybe happening. I am in the CDT time zone, so we can schedule a meeting time accord to your respective time zone.

From the results of the live meeting, we can possibly address this issue for the both of you.

Kind regards,
Nelson
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
Svetlana
Top achievements
Rank 1
answered on 10 Jun 2010, 08:22 AM
Hello Nelson,

I have 2010.1.5.18 version (QA test studio).
I will simulate 'Real click' and see whether the problem still reproduced.

Thanks,
Svetlana
0
Missing User
answered on 17 Jun 2010, 04:51 PM
Hello again Svetlana,

Just wanted to check back with you on this to see if this worked out for you. I left the ticket open as long as possible before replying, but feel free to reply back whenever you get a chance.

Greetings,
Nelson
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
Kristine Ayson
Top achievements
Rank 1
answered on 21 Jun 2010, 10:23 AM
Hi Telerik Team,

I have the same error as Svetlana and Aadi.

I have this inside a function that is called by a coded step:

            Pages.App.SilverlightApp.BtnLoginButton.User.Click();

            // wait for page to load
            Log.WriteLine("Waiting for page to load");
            Pages.App.SilverlightApp.HomeTextblock.Wait.ForExists(5000000);

"Waiting for page to load" message is logged in WebAii_Log. However, exception is thrown for the Wait.ForExists step. I tried playing with the wait for value (50,000..5,000,000) but I always get the same behavior - execution is stopped right after login button click.

--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[Test_Login_Clean_CodedStep] : Test Login_Clean, RequiresSilverlight=True'.
InnerException:
System.ApplicationException: Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   --- End of inner exception stack trace ---
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at ArtOfTest.InternetExplorer.JsObjectWrapper.Call(String methodName, Object[] args)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":{"ObjectName":"$root","Path":"\/shell:-1:37132456","Properties":[]},"Reference2":null,"Type":4,"Value":"YekmWO\/wmDFSAGMwKRLE7Qr3EBk="}',ClientId:'Client_f9abc874-7e52-4acb-90f0-9975f1abec2e',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   --- End of inner exception stack trace ---
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at ArtOfTest.InternetExplorer.JsObjectWrapper.Call(String methodName, Object[] args)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetVisualTree(IAutomationPeer root, String hash)
   at ArtOfTest.WebAii.Silverlight.VisualTree.Refresh()
   at ArtOfTest.WebAii.Silverlight.FrameworkElement.Refresh()
   at ArtOfTest.WebAii.Silverlight.VisualWait.WaitForExistsByFindInfo(VisualFindInfo findInfo)
   at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)
   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.ForExistsInternal(Int32 timeout, Boolean invertCondition)
   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)
   at GRCSuite_Performance.Pages.GRCPlatformPage.SilverlightAppElement.get_HomeTextblock() in c:\Users\kayson\Documents\WebUI Test Studio Projects\GRCSuite_Performance\Project.cs:line 337
   at GRCSuite_Performance.Test_Performance.do_login(String message) in c:\Users\kayson\Documents\WebUI Test Studio Projects\GRCSuite_Performance\Test_Performance.aii.cs:line 137
   at GRCSuite_Performance.Test_Performance.Test_Login_Clean_CodedStep() in c:\Users\kayson\Documents\WebUI Test Studio Projects\GRCSuite_Performance\Test_Performance.aii.cs:line 152
--------------------------------------------------
--------------------------------------------------
'6/21/2010 5:03:27 PM' - Overall Result: Fail
--------------------------------------------------


Best Regards,
Kristine
0
Jason Pritchard
Top achievements
Rank 1
answered on 21 Jun 2010, 02:34 PM
I think I have the same issue but it is related to the fact that the session is still maintained from a previous test. The common element for this tread is login button. Is there a way to do conditional logic. IE Check if the element is visible and if so perform the step....

I check the session state by writting it to the screen between calls. 

Just a thought
0
Missing User
answered on 21 Jun 2010, 06:54 PM
Hello Kristine and Jason,

Yes, it seems to be the case that all of the posts have the error occurring after the login.

@Jason,  just to confirm quickly, are you testing over a Silverlight app also ? And do you have a custom coded step also for the login and subsequent test step as Kristine does?

Kristine's custom code step does something similar to a wait for visible with Wait.ForExists(5000000);. There is also a Wait For Visible Quick Task Test Step from the Elements Menu you can add over any element when you highlight it in the Recording Window.

But for the error, there are a few things we can try:

- Add a 'Wait For Url' test step from the 'Add' drop down dialog and adjust time out as necessary
- Add an 'Execution Delay Test Step' also from the 'Add' drop down dialog and adjust time out as necessary

@Kristine, if the above Wait For Url or Delay Step do not work, about how long does it take to transition from Login to the Text Block Page? Please try increasing the following options: Client Ready Timeout, Execute Command Timeout, Silverlight Command timeout. They are found in:

- Dev Edtion: .testrunconfig file -> WebAiiTest -> General Tab
- QA Edition: Test List Tab -> Edit Settings

If the above does not work, you can try editing the Get function in the Project.cs File.

- Dev edition, you can just right click on 'HomeTextblock'  -> Go To Definition
- QA edition, you would need to open the Project.cs file from the Test Project location in an text editor.

Once you find the Get Function for 'HomeTextblock' in the Project.cs file, please try editing it like the following:

return Get<ArtOfTest.WebAii.Silverlight.UI.TextBlock>(new XamlFindExpression("TheExistingGeneratedFindExpressionString"), true, 50000);

 The Find String that already exists for the Get should be where the blue String is, with just the true boolean and time out added to the function.

Please let me know if you have any questions on the above.

Greetings,
Nelson
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
Missing User
answered on 22 Jun 2010, 05:11 PM
Hello again,

@Kristine Just to add quickly, does a regular Wait For over the TextBlock recorded by WebUI that is not converted to code run correctly? Also, is your TextBlock a customized version of the generic Silverlight kit TextBlock?

Greetings,
Nelson
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
Kristine Ayson
Top achievements
Rank 1
answered on 23 Jun 2010, 03:49 AM
Hi Nelson,

Thank you so much for your suggestions.

 1. Added 'Wait For Url' code right after login button click
 2. Added 'Execution Delay' code right after login button click
 3. It normally takes 20 seconds for the text block page to load so I have set the Test list settings to:
     ClientReadyTimeout = 100,000
     ExecuteCommandTimeout = 100,000
     SilverlightConnectTimeout = 100,000
4. Edited Project.cs

                public ArtOfTest.WebAii.Silverlight.UI.TextBlock HomeTextblock
                {
                    get
                    {
                        return Get<ArtOfTest.WebAii.Silverlight.UI.TextBlock>(new XamlFindExpression("TheExistingGeneratedFindExpressionString"), true, 60000);
                    }
                }

> I tried each one out but none so far solves the error - execution is still stopped right after click of the login button.

> The Wait For TextBlock works for the regular recorded WebUI test steps.
> HomeTextBlock is found in a Telerik RadTab. It is the last loaded element in the page that's why I chose it for the Wait For exists to ensure that the page has been loaded completely before doing other steps.

Since the regular WebUI recording works, I might just try to use it for the mean time.

Best Regards,
Kristine
0
Missing User
answered on 23 Jun 2010, 04:55 PM
Hi Kristine,

Thanks for trying all of that and the extra information. It's strange that the regular recorded step is working, but converting to code causes this problem.

You can also try the following in the code behind file:

//Pages.App.SilverlightApp.HomeTextblock.Wait.ForExists(5000000);
Pages.App.SilverlightApp.Get<ArtOfTest.WebAii.Silverlight.UI.TextBlock>(new XamlFindExpression("TheExistingGeneratedFindExpressionString"), true, 40000).Wait.ForExists();

Just to confirm, instead of the blue string above in the code, please have the XamlFindExpression() argument as the string auto generated by WebUI in the Project.cs file. You can right click on HomeTextblock and select 'Go To Definition' to find the string (it's typically in red in Visual Studio).

Also, the inner exception you posted previously is also unusual. Would it be possible to grant us temporary access to your SL app for us to check out on this end? We can sign any NDA you would require.

All the best,
Nelson
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
Missing User
answered on 29 Jun 2010, 03:25 PM
Hello again Kristine,

Just wanted to check back to see if the modified code worked for you.

Kind regards,
Nelson
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
Svetlana
Top achievements
Rank 1
answered on 30 Jun 2010, 03:44 PM
Hello Telerik team,

I've increased ClientReadyTimeout and ExecuteCommandTimeout in test list settings.
Now I get 'time out' error on coded steps in FireFox only. The error is reproduced not after login but on frame's element verification.

Exception thrown executing coded step: '[CodedStep49] : Verify attribute 'value' has 'Exact' value of selected group on 'GroupCombo''.
InnerException:
System.TimeoutException: Wait for condition has timed out
   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.Core.Browser.WaitUntilReady()
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.InvokeScript(String script)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.GetValue[T](String propertyName, T defaultValue)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.GetValue[T](String propertyName)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.AssertAttribute.GetAttribute(String name)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.AssertAttribute.Value(String attributeName, StringCompareType compare, String expectedValue)
   at Proj.CodedStep49() in c:\Users\Documents\WebUI Test Studio Projects\Proj\test.aii.cs:line 622

Could you, please, clarify how can I avoid the problem?

Regards,
Svetlana
0
Missing User
answered on 30 Jun 2010, 08:11 PM
Hi again Svetlana,

Thanks for the post back and editing those settings.

This sounds like what Kristine is running into, even though I believe you are testing html pages and Kristine is testing Silverlight.

For coded steps, the current work around is to edit the code behind file directly to use a modified Get function with a longer wait time from the Project.cs or Project.vb file.

I believe I may not have explained this correctly in my past post, so I've attached videos on how to do this in both QA and Dev Edition.

Please note from the videos that I am demonstrating this against a converted test step that sets the Google search box with the value 'google'. Please also note that I am using C#  with a Project.cs file (in VB the file would be Project.vb and the syntax would be different) and the wait time I set is 10000 ms.

Just as a general note, for Silverlight it would be XamlFindExpression instead of HtmlFindExpression in the video.

Let us know if you have any questions on the above.

Sincerely,
Nelson
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
Svetlana
Top achievements
Rank 1
answered on 01 Jul 2010, 09:22 AM
Hi Nelson,
Thank you for the video. I've added this code to my test, but it does not help :(

 ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputText groupCheck = Pages.Site.FrameEmployeeWindowDetails.Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputText>(new HtmlFindExpression ("id=ctrlGroupSelector_comboSubGroup_Input", "tagname=input"), true, 500000);
            groupCheck.AssertAttribute().Value("value", ArtOfTest.Common.StringCompareType.Exact, employeeGroup);

I get the same error in FF. I increased the timeout to 100000, but the result is the same (by the way, this timeout is measured in milliseconds)?

In IE I get the following error:
ArtOfTest.Common.Exceptions.AssertException: String match failed (CompareType:Exact). - [Expected:NewValue],[Actual:]
   at ArtOfTest.WebAii.Controls.BaseControlAssert`1.Assert(Boolean condition, String message, String expected, String actual, Boolean throwAssert)
   at ArtOfTest.WebAii.Controls.BaseControlAssert`1.AssertString(String expected, String actual, StringCompareType compareType)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.AssertAttribute.Value(String attributeName, StringCompareType compare, String expectedValue)



I have several coded steps before this failed one, all these steps are performed after frame opening and long timeout. It's strange, but only this step is failed.

Is there another work around?

Regards,
Svetlana
0
Missing User
answered on 01 Jul 2010, 10:03 PM
Hello again Svetlana,

Thanks for the extra information. It looks like you maybe getting a generic Timeout in your Firefox test runs. But just to confirm, are you getting the error in IE on the exact same line as in Firefox?

If it is the case that you are getting the error on the same line, it looks like the it's a verification/assert failure:

ArtOfTest.Common.Exceptions.AssertException: String match failed (CompareType:Exact). - [Expected:NewValue],[Actual:]

It seems that the value is blank on the test playback when you are expecting NewValue. Please check to see if the value does exist on test playback, or if the value may still be loading when the error occurs indicating it maybe a timing issue.

Regards,
Nelson
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
Svetlana
Top achievements
Rank 1
answered on 06 Jul 2010, 09:59 AM
Hello Nelson,

The errors in FF and IE were on the same string. But "Wait for condition has timed out" error was only in FF. Strange, but this error in FF occurred time after time.

Regards,
Svetlana
0
Missing User
answered on 06 Jul 2010, 11:41 PM
Hello again Svetlana,

Thanks for clearing that up. Unfortunately at this point, we would need to know exactly what is happening during the test run against your application to see what may be happening.

Just to quickly confirm though, does this step work when not converted to code? Or does the test pass when run in debug mode instead of running the test normally?

But if this step fails regardless of being re-recorded or when debugged, would it be possible for you to allow us temporary access to your application to diagnose the problem?

Regards,
Nelson
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
Svetlana
Top achievements
Rank 1
answered on 07 Jul 2010, 09:07 AM
Hello Nelson,

The step was failed when run from test creation view and within test list, but sometimes (1 case out of 10) it was passed.

Unfortunatelly exact this action can't be performed when the step is not converted to code (I compare field's value with variable and don't know how to do this without convert in code).

I have the step with verification on element visibility right before the problem step. And the verification is passed, so the element is presented on the page on the moment when the verification should be done:

My coded step:
 ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputText groupCheck = Pages.Site.FrameEmployeeWindowDetails.Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlInputText>(new HtmlFindExpression ("id=ctrlGroupSelector_comboGroup_Input", "tagname=input"), true, 500000);
            groupCheck.AssertAttribute().Value("value", ArtOfTest.Common.StringCompareType.Exact, employeeGroup);

The issue is reproduced for input fields, but for the labels on the same page at the same moment all works fine.

Regards,
Svetlana
0
Missing User
answered on 07 Jul 2010, 06:55 PM
Hello again Svetlana,

I retried the scenario in Firefox with coded steps on HtmlInputText types and can not reproduce the problem.

The only thing that I can think of at this point is to try disabling the other Firefox Add-Ons besides the WebAii 2.1 Automation Infrastructure to see if another Add-On maybe causing some conflicts.

But since you mentioned this is something that is not recordable and requires code, then it seems this will require more debugging.

Unfortunately, we would need to see this in order to help further. If possible, please grant us temporary access to your application from which we can see what maybe happening, and debug against the WebUI source code if need be.

Alternatively, if we can setup a  Live Meeting with one of you so that I can look at the problem. I am in the CDT time zone, so we can schedule a meeting time according to your respective time zone.

Sincerely,
Nelson
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
Lurife
Top achievements
Rank 1
answered on 14 Feb 2013, 05:14 PM
Hi,

I am recording a tesp step in a WPF application using Telerik Test Studio ver. 2012.2.920.0. The test step where it is failing is when I try to

> leftDoubleClick on a certain portion of the application for it to open. see leftdouble click screenshot.

I think the recorded step is not recognize by the recorder. I have added an execution delay on the step as what it states here but doesn't work.

Below is the error I am getting:

n eFailure Information: ~~~~~~~~~~~~~~~Wait for condition has timed outInnerException: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, Boolean& byBackupSearch) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

Attached also is the recorded step and where it failed. Hope anyone would help me.


Thanks,
Lurife

0
Plamen
Telerik team
answered on 19 Feb 2013, 01:50 PM
Hello Lurife,

First please go ahead and upgrade to our latest internal build version 2012.2.1317. It contains hundreds of bug fixes and optimizations since our 2012.2.920 release. You can download it from your Telerik.com account.

Also try to replace the execution delay step(step 5) with "Wait for Exist" step as seen in this article. In this way Test Studio will wait up to the time set in the Timeout property, refreshing the DOM tree on every 500 ms, and when the element is found will proceed with the next step.

If you continue to have difficulty, please sand us a sample WPF application that we can use to reproduce the problem locally and analyze what is causing it. If you feel any of this information is sensitive, you can submit a support ticket which is confidential, unlike this forum.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Svetlana
Top achievements
Rank 1
Answers by
Missing User
Svetlana
Top achievements
Rank 1
aadi kumar
Top achievements
Rank 1
Kristine Ayson
Top achievements
Rank 1
Jason Pritchard
Top achievements
Rank 1
Lurife
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or