Duration for WaitForExists Confusion

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
sheafox
Posts: 23
Joined: Mon Jul 09, 2018 3:54 am

Duration for WaitForExists Confusion

Post by sheafox » Thu Oct 11, 2018 4:01 pm

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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Duration for WaitForExists Confusion

Post by odklizec » Thu Oct 11, 2018 4:12 pm

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

sheafox
Posts: 23
Joined: Mon Jul 09, 2018 3:54 am

Re: Duration for WaitForExists Confusion

Post by sheafox » Thu Oct 11, 2018 5:04 pm

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