Page 1 of 1

Duration for WaitForExists Confusion

Posted: Thu Oct 11, 2018 4:01 pm
by sheafox
I am confused on the duration for WaitForExists. I am trying to do additem.SelfInfo.WaitForExists(120000) to wait for 2 minutes for the form appear. However the timeout seems much shorter. It seem that WaitForExists is ignoring the duration amount I entered. What am I doing wrong?

Re: Duration for WaitForExists Confusion

Posted: Thu Oct 11, 2018 4:12 pm
by odklizec
Hi,

The duration value is the maximum time waitforexists waits for the element appearance. Waitforexists terminates right after the element is found. Hope this helps?

Re: Duration for WaitForExists Confusion

Posted: Thu Oct 11, 2018 5:04 pm
by sheafox
It should have waited 2 minutes but it only seems to be 10 seconds. I am seeing the following exception in the log:

Code: Select all

DelphiAutomation.GetRoot: Exception of type 'Ranorex.Core.HwndInvokerException' was thrown. Window Handle: 6360950. Win32 Error: This operation returned because the timeout period expired.
(This message is only shown once per report.)