12-14-2011, 11:22 AM
@ Lorena: There are 3 cases.
Case 1: Exit----> without any timeout.
In this case qtp will search the object according to the Object syncronization time out.
Case 2: Exit(0)--->time out specified as 0
In this case QTP returns the True or False value immediately.
Case 3: Exit (#)---> time out specified as some value.
In this case QTP waits until it finds the object or until the timeout is reached.
I tried all the three case at my end and it was working very fine.
Below is the script that i used for my internal portal.
Here I am looking for a link which is present on some another page.
When I am using Exit(0) its immediately giving me msgbox as True.
and when I am using Exit alone it takes time according to the Object syncronization value.
Please try it again and let me know.
Regards,
Sankalp
Case 1: Exit----> without any timeout.
In this case qtp will search the object according to the Object syncronization time out.
Case 2: Exit(0)--->time out specified as 0
In this case QTP returns the True or False value immediately.
Case 3: Exit (#)---> time out specified as some value.
In this case QTP waits until it finds the object or until the timeout is reached.
I tried all the three case at my end and it was working very fine.
Below is the script that i used for my internal portal.
Code:
MsgBox("Welcome")
If Browser("My News").Page("My Applications").Link("eManager").Exist(0) Then
MsgBox("false")
else
MsgBox("true")
End If
Browser("My News").Page("My News").Link("My applications").Click
Browser("My News").Page("My Applications").Link("eManager").Click
Here I am looking for a link which is present on some another page.
When I am using Exit(0) its immediately giving me msgbox as True.
and when I am using Exit alone it takes time according to the Object syncronization value.
Please try it again and let me know.
Regards,
Sankalp