How can I increase the timeout period?

Subscribe to this thread
Feed for this thread Post Reply
#1
How can I increase the timeout period?
Posted on 18 Mar 2011, 08:44 AM
Matthew Shapiro User avatar
Valued member
Valued member
Posts: 26
Reputation: 9
When I perform a specific action, the action seems to take longer to complete than TC's default period, causing an exception with the message "This operation returned because the timeout period expired. (Exception from HRESULT: 0x8001011F".  

Through the C# API, how can I change the timeout period, and what is the current default timeout period?  

The only information I can find in the F1 docs are to use the Options Run Timeout property, but when I try to do "Connect.Options["Run"]["Timeout"] = 3000;" I get a NullReferenceException.

Like
Dislike
This reply answers my question
#2
RE: How can I increase the timeout period?
Posted on 21 Mar 2011, 08:24 AM
Matthew Shapiro User avatar
Valued member
Valued member
Posts: 26
Reputation: 9
Anyone have any idea on how to do this?

Vote for this reply
Like
0
Dislike
This reply answers my question
#3
RE: How can I increase the timeout period?
Posted on 21 Mar 2011, 03:12 PM
Allen User avatar
Staff
Posts: 1657
Reputation: 101
Hello Matthew,  

Before accessing the TestComplete project's objects from within a connected application, you should call the Connect.RunTest routine. Please review the Running Connected and Self-Testing Applications help topic.

The Connect.Options["Run"]["Timeout"] property can be changed from within the TestComplete GUI (the Auto-wait timeout option of the Tools | Current Project Properties | Playback page). Its default value is 10000 ms.

If increasing of the auto-wait timeout period does not help, please provide us with the test code that contains the problematic line.
Best regards,
Allen

Vote for this reply
Like
0
Dislike
This reply answers my question
#4
RE: How can I increase the timeout period?
Posted on 23 Mar 2011, 01:01 PM
Matthew Shapiro User avatar
Valued member
Valued member
Posts: 26
Reputation: 9
Even starting my testing with


            // Connect to the Test Complete engine and start the project

            Connect.RunTest(testName, projectName, Path.GetFullPath(projectSuiteFile));

            Connect.Options["Run"]["Timeout"] = 20000;


still causes TC to time out after 10 seconds, not 20.

Vote for this reply
Like
0
Dislike
This reply answers my question
#5
RE: How can I increase the timeout period?
Posted on 23 Mar 2011, 01:20 PM
Matthew Shapiro User avatar
Valued member
Valued member
Posts: 26
Reputation: 9
Also, doing this through the Project options does not seem to take, at least not by TestExecute.

Vote for this reply
Like
0
Dislike
This reply answers my question
#6
RE: How can I increase the timeout period?
Posted on 08 Apr 2011, 02:37 AM
Alex User avatar
Staff
Posts: 869
Reputation: 146
Hello Matthew,

It's quite unusual that you have failed to change the Auto-wait timeout option from within the connected application. If you still need to change the option from the connected application, please send us the connected application project using the Contact Support Form, and we'll help you do this.

However, I suppose that the 'This operation returned because the timeout period expired' exception points to a problem specific to open applications, and the Auto-wait timeout option will not resolve the problem. Instead of increasing this option, try setting the value of the  Method invoke timeout option to 10000 ms. To learn about this option, please see the Project Properties - General Open Applications Options help topic.

If increasing the method invoke timeout does not help, please provide us with the test code that contains the line that leads to the 'This operation returned because the timeout period expired' exception.
Alex,
Customer Care Manager, Testing Products
Customer Care by SmartBear

Vote for this reply
Like
0
Dislike
This reply answers my question
#7
RE: How can I increase the timeout period?
Posted on 08 Apr 2011, 09:22 AM
Matthew Shapiro User avatar
Valued member
Valued member
Posts: 26
Reputation: 9
Success!  Setting the Method invoke timeout seems to have fixed the issue!

Thank you for your reply :)

Vote for this reply
Like
0
Dislike
This reply answers my question
Post Reply