Page 1 of 1

wait for not exists

Posted: Wed Jul 25, 2012 12:27 pm
by martinsw
Dear Ranorex,

The "wait for not exists" action comes with a timeout value. I am building an automation to test a web application and I don't want my automation to wait any longer than is necessary (speed is of the essence!).

Once the element concerned no longer exists, I want the automation to proceed to the next step straight away rather than waiting for the specified timeout value to elapse. Is there a value that I can specify for the timeout period which will make this happen? (i.e. would setting the timeout period to "0" have this effect?)

What I want is for the "wait for not exists" action to be "performance sensitive". For example, if network performance is good during test run A and the element no longer exists after 500ms, I want the automation to proceed to the next action straight away. However, if network performance is slow during test run B and it takes the element 2 seconds to no longer exist, again I want the automation to wait no longer than is necessary (in this case 2 seconds) before proceeding to the next step.

Is there any way this can bee achieved?

Thanks, Martin

Re: wait for not exists

Posted: Wed Jul 25, 2012 3:40 pm
by Support Team
Hi Martin,

The "WaitForNotExists(waitTimeout)" action does exactly what you want to achieve.
The waitTimeout parameter just tells Ranorex how long the automation should wait maximally for the disappearance of an item.

Kind regards,
Larissa
Ranorex Support Team

Re: wait for not exists

Posted: Thu Jul 26, 2012 6:47 am
by artur_gadomski
But doesn't it also wait as log as search timeout is on the element? If it's 30s it will return 30s after element disappears.

Re: wait for not exists

Posted: Thu Jul 26, 2012 9:41 am
by martinsw
Thanks Larissa

Re: wait for not exists

Posted: Thu Jul 26, 2012 10:16 am
by Support Team
You are welcome, Martin.

@ Artur:
Imagine following scenario: We have an item MyItem within a recording and we want to continue the automation as soon as MyItem disappears.

Since we want to continue as soon as possible with automation we use the action WaitForNotExists instead of Delay.

Now Ranorex does the following:
The search timeout of MyItem defines the time-interval used for the search of the item. If the item can't be found in this period, the run ends with a failure. If the item is found in this period Ranorex performs the action on our item MyItem (the WaitForNotExist action) and continues immediately after MyItem disappears.

Hope the difference is clear now.
Larissa
Ranorex Support Team