Answer Posted / kamakshya prasad podh
QUESTION: what are the different options that we can use to
synchronize the test?
Answer: By using
i) Synchronization Point i.e Sync
ii) WaitProperty Method
iii) Wait Statement/Exist statement
QUESTION: Use of Synchronization i.e Sync Method
Answer:
‘The following example uses the Sync method to complete the
navigation to the specified page.
SystemUtil.Run "iexplore.exe","www.cnn.com"
Browser("Google").Page("CNN.com - Breaking News,").Sync
Browser("Google").Navigate "http://www.cnn.com/"
Browser("Google").Page("CNN.com - Breaking News,").Link
("Health").Click
wait(10) ‘wait for 10 sec
browser("Google").Back
QUESTION: Use of Exist Method
‘The following example uses the Exist method to check
whether the
'Search Flights image exists five seconds after it clicks
the
'Login image.
Browser("Mercury Tours").Page("Mercury Tours").Image
("Login").Click 0, 0
Wait (5)
Browser("Mercury Tours").Stop
If Browser("Mercury Tours").Page("Welcome to Mercury").Image
("Search Flights").Exist Then
MsgBox "The Image Exists."
Else
MsgBox "Cannot find the Image."
End If
QUESTION: Use of WaitProperty Method
Waits until the specified object property achieves the
specified value or exceeds the specified timeout before
continuing to the next step.
‘The following example uses the WaitProperty method to wait
for the
'Google Search edit box to be enabled before setting its
value to 'QTP Script'.
'If it is still disabled after the test's
'Object Synchronization Timeout time has been exceeded, it
will not
'perform the Set method.
If Browser("Google").Page("Google").WebEdit
("q").WaitProperty("disabled",0) Then
browser("Google").Page("Google").WebEdit
("q").Set "QTP Script"
browser("Google").Page("Google").WebButton("Google
Search").Click
End If
'If Browser("google").Page("index").WebEdit
("Account").WaitProperty("disabled", 0) Then
' Browser("index").Page("index").WebEdit("Account").Set
("123")
'End If
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
What is the file extension of the code file in qtp?
Step 3&4 are repeated until an the object in recognised uniquely.
How to handle the exceptions using recovery secnario manager in quicktest professional?
Can we create user defined functions in qtp?
What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.
If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP
QTP 10.0 is not identifying web objects for IE 8.it is identifying like winObject.I installed HP patch QTPWEB_00037.Still getting issue
Explain the concept of object repository and how qtp recognises objects?
Can I change properties of a test object?
whare exactly we have to use functions and sub routain
how to test Web application using QTP software
How software automation specialist enter steps in the Expert View?
How the smart identification is used in real time?Please explain with an example
how to acess a test in RSA?