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.
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.
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.