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

System.TimeoutException Error

5 Answers 130 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anshul
Top achievements
Rank 1
Anshul asked on 29 Nov 2010, 01:32 PM
Hi Telerik Team,

I am Evaluating the tool for Automation testing. Its a great tool with tiny vital features.
I am getting the following Error while opening a popup. popup is taking more time to load page elements,  Becuase tool is not able to find the element in pre-defined time, it closes the window and throwing the following error. 

Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[CreateCodeTest_CodedStep] : Connect to pop-up window : 'http://rsqaapp/AutomationTesting/Entity/EntityEditor.aspx', ConnectToPopup=True'.
InnerException:
System.OperationCanceledException: Exception occured waiting for the new browser to connect. ---> 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.Manager.WaitForNewBrowserConnect(String url, Boolean isPartial, Int32 timeout)
   --- End of inner exception stack trace ---
   at ArtOfTest.WebAii.Core.Manager.WaitForNewBrowserConnect(String url, Boolean isPartial, Int32 timeout)
   at Example1.CreateCodeTest.CreateCodeTest_CodedStep() in f:\Anshul\WebUI Test Studio Projects\Example1\CreateCodeTest.aii.cs:line 77
--------------------------------------------------
'11/29/2010 5:37:45 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'11/29/2010 5:37:45 PM' - Overall Result: Fail
--------------------------------------------------

Thanks and Regards,
Anshul

5 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 29 Nov 2010, 08:10 PM

Hi Anshul,

First try using the built-in feature PopupWaitTimeout, which will be in the properties for the step that starts with "Connect to popup...". I have included a screenshot showing where the item is in the properties window. Try doubling the amount of time listed (it will be in milliseconds) and re-testing.

If the above does not change your symptom, then try to implement an "Execution Delay". This delay type is separate from the one already mentioned and is not tied to another step. It will create its own step to allow a certain amount of time to pass before proceeding.

To accomplish this:

  1. Open the project in QA edition you want to have the execution delay
  2. Open the test that will have the execution delay in it
  3. Click the Record tab (if you are not already on it)
  4. In the toolbar (between your steps and the tabs), look for the Add section.
  5. In the Add section is a More button, click this button
  6. Click the option labeled Execution Delay
  7. Set the timeout for the execution delay to be however long you need for the elements to load.

A good practice on this for automation is to allow up to twice as long in the timeout as is needed for the items to draw the page. By this, I mean that if your page takes 5 seconds to load, set the execution delay for 10 seconds to make sure that a networking issue doesn't return a false negative (fail). However, if your page takes much longer to load (30+ seconds), a 60 second delay may be too much, so you will want to tweak the setting in this scenario to better suit your needs.

Best wishes,
Keaegan
the Telerik team

Interested in Agile Testing?

Tune in Wednesday, December 1st for a very special Webinar focused on Agile Testing. Click here to register for free!
0
Anshul
Top achievements
Rank 1
answered on 30 Nov 2010, 07:53 AM
Hi Keaegan,

Thanks for your response,
I tried both the options, but getting the same error. I have attached the screenshot also.
I am seeking for an appropriate solution for this problem.

Regards,
Anshul
0
Keaegan
Telerik team
answered on 30 Nov 2010, 07:30 PM
Hi Anshul,

The step has been added correctly, did you try any other wait amounts other than the default 250 milliseconds (.25 second)? If you are using the coded step to wait for Silverlight, I would suggest at least a 10 second wait to allow for more latency from the server (Silverlight can take a while to load). If this is for an HTML version of the RadTreeNode, not as long of a wait period is needed.

From your screenshot I see that you created a coded step to handle the connection to the pop-up window, was there a reason for doing it this way instead of using the built-in pop-up handlers? This type of step can be accomplished without code, so I wanted to see what special needs you had that made using a coded step necessary.

Please use the built-in handler for recording the pop-up opening/handling, and as well closing the pop-up window. Coded steps should not be necessary for handling the pop-up window until it opens and you find that navigation within the window is not possible without using coded steps. 

I'll look for your reply with the result of using the built-in handler, as we will want to implement this first for controlling/bringing up the popup. If it generates an error, please still keep it in place an let me know what the error message is. Also, if these steps don't help, I would like to setup a Goto meeting with you so that we can see what is going on more closely on your circumstance.

Greetings,
Keaegan
the Telerik team
Interested in Agile Testing?

Tune in Wednesday, December 1st for a very special Webinar focused on Agile Testing. Click here to register for free!
0
Anshul
Top achievements
Rank 1
answered on 01 Dec 2010, 07:39 AM

Hi Keaegan,

Thanks for the response again, I have tried both the approaches.

Before using the coded step, I used the built-in handler feature only to control the popup. But in my application it is taking more time to load after 1 popup goes and another comes in reference of previous one.

In my application, we are using HTML version of RadTreeNode. Previously I was working with popup in script, but now I have removed the popup also, and trying with normal one page only where I am clicking on RadTreeNode and the page will load with associated controls. This process is taking more time then predefined time in ‘WaitOnElementTimeOut’ property of an element and ‘Execution Delay’ timeout.

I am unable to solve this problem. it would be great if you can suggest the timings for GoToMeeting.

 

Thanks in Advance.

Regards,

Anshul

0
Keaegan
Telerik team
answered on 02 Dec 2010, 07:00 PM

Hello Anshul,

I am able to setup a 30 minute conference, and have the following time slots open currently (we are in GMT-6, so all times below are GMT-6):

  • Thursday, December 2nd:
    1. 3:00-3:30PM 
    2. 3:30-4:00PM 
  • Friday, December 3rd:
    1. 10:30-11:00AM 
    2. 11:00-11:30AM 
    3. 2:00-2:30PM 
    4. 2:30-3:00PM 
    5. 3:00-3:30PM 
    6. 3:30-4:00PM 

Please pick a time slot, and I will create a GoTo Meeting for us so we can take a look at this issue through this avenue instead. I'll look for your reply with a time selected.

Kind regards,
Keaegan
the Telerik team

Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
Anshul
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Anshul
Top achievements
Rank 1
Share this question
or