cancel
Showing results for 
Search instead for 
Did you mean: 

WaitWinFormsObject wait for project's Method invoke timeout instead its own

g_kucharski
Occasional Contributor

WaitWinFormsObject wait for project's Method invoke timeout instead its own



Hello,

I notices that in some cases WaitWinFormsObject pauses the test for project's Method invoke timeout instead for Method's Timeout.



I call the method as usual:



IF

Aliases.MyApp.WaitWinFormsObject("MyForm", 500).Exists then

...

end if



When there is no "MyForm" TestComplete freezes for 1min (I have project's Method invoke timeout Set for 60000ms) displaying 'waiting for WaitWinFormsObject("MyForm")'. I would expect rather 0,5s freeze.

The effect may be bound with CallObjectMethodAsync called just before:

1. I open a Form1 with CallObjectMethodAsync

2. Do some operations on Form1

3. I Close Form1, with CallObjectMethodAsync

4. As result of Form1.Close MyForm may appear. MyForm is modal and close method freezes test until MyForm is closed... that is why I have to use Async call for Form1.Close.

Did anyone experienced similar problem? Is there a workaround for it? Can project's Method invoke timeout be changed from script level perhaps?



regards

Greg


2 REPLIES 2
TanyaYatskovska
Community Manager

RE: WaitWinFormsObject wait for project's Method invoke timeout instead its own


Hi Grzegorz,


 


You've said that you observe this behavior only in certain cases. Can you identify the details that lead to this issue?


As a rule, the Wait methods wait for the specified time until the object appears (500 ms in your case).


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Ryan_Moran
Valued Contributor

RE: WaitWinFormsObject wait for project's Method invoke timeout instead its own

When the parent object of your form (the process) does not exist Test Complete will wait the full timeout. You need to check that the process exists prior to checking if the form exists.

''-Praise the sun and Give Kudos.''
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors