Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any replacement to Wait()
#1
Solved: 11 Years, 4 Months ago
I have a window while launching it is taking time. I am using wait right now. Is there is any better option than wait. If I say wait 10 it is waiting for 10 seconds instead if the browser comes back in 4 seconds I don't want to be waiting for the complete 10 seconds.

Thank you in advance.

Thx
Sri
Reply
#2
Solved: 11 Years, 4 Months ago
use a while loop with a condition

Code:
while not found
  if VbWindow("Window").Exist(1) then
    found = true
  end if
wend

Using the exist method with timeout will constantly check for the window to exist and wait the timeout setting for it. Once the object does come up it will set the condition to end the loop and continue.
Another possible method, just a twist on the code.

Code:
While not VbWindow("Window").Exist(1)
wait(1)
wend

Same thing, just a little less code.
Reply
#3
Solved: 11 Years, 4 Months ago
jsknight1969, Thank you very much for your immediate response. I will test it and use it.

Thx
Sri
Reply
#4
Solved: 11 Years, 4 Months ago
Hi Srini,

You could use "WaitProperty" method too.

It Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Syntax:
object.WaitProperty (PropertyName, PropertyValue, [TimeOut in millisec])

Examples:
Code:
VbWindow("FRMDI General").WaitProperty("Text", "FRMDI General", 10000)
VbWindow("FRMDI General").WaitProperty("enabled",True,10000)

Try it out & see , It would solve your problem easily Smile
Reply
#5
Solved: 11 Years, 4 Months ago
Hi,

You can use theenvironment variable and specify various time wait parameters like
1. waittime for checkbox.
2 Wait time for page.
3. Wait time for table
and like this other controls.

Syntax:
Object.wait("waittime")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  help with wait property function kp_usa 3 4,302 12-20-2012, 10:49 PM
Last Post: kp_usa
  wait QAVA 1 3,014 11-13-2012, 07:29 PM
Last Post: imzeeshan
  How to control WAIT time with STATIC variable? chong67 3 3,987 06-22-2012, 10:38 AM
Last Post: sshukla12
Exclamation Alternative for Wait Statement Veekay 2 8,562 03-20-2012, 07:13 PM
Last Post: swathi
  Verifying the value exists and if not, wait up to 5min HeZma 3 4,060 02-25-2012, 12:21 PM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 4 Guest(s)