Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change "wait time" in conditional statement If
#1
Solved: 11 Years, 4 Months ago
Hi,
I use in expert view syntax expression like

Code:
IF JavaWindow.(...).JavaButton("Accept").Exist Than
(...)
End If

and when i run test (in fast mode) i have to wait 10 sec for each IF inside my path.

Is there possibility to improve it ? give it just few secounds to wait?

best regards


answer Wrote:VirtualButton.Exist([Timeout])
u can grab more info in help at exist Method in VButton object
Reply
#2
Solved: 11 Years, 4 Months ago
Just before If statement you can use
Setting("DefaultTimeout") = 1000 where 1000 is in milliseconds.
this will make the default timeout for the object to the no you have specified (in italics).


Regards
Raj
Reply
#3
Solved: 11 Years, 4 Months ago
You need to put the time to wait in parenthesis, .Exist(2), so that the statement will wait for that time in seconds. If you leave this blank, QTP will wait for the default 20 seconds. So:
Code:
IF JavaWindow.(...).JavaButton("Accept").[b]Exist [/b]Than
(...)
End If

Code:
Should be
IF JavaWindow.(...).JavaButton("Accept").[b]Exist(2)[/b] Then
(...)
End If
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you Change Run mode mid script? Caleytown 6 7,234 03-25-2021, 08:27 AM
Last Post: RB26578
  [UFT] Change property of object (WpfButton) robertosalemi 2 2,627 11-22-2016, 12:43 PM
Last Post: Ankur
  Dynamic change of name for Webtables prakashreddy 1 2,386 10-25-2014, 09:53 PM
Last Post: supputuri
  How can I change my test folders, globally? atester 0 2,029 10-03-2014, 04:37 PM
Last Post: atester
  JavaDialog change every time i run my test Pkapoor 3 2,994 06-28-2013, 09:27 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)