Synchronozation types in QTP

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


Please Help Members By Posting Answers For Below Questions

How to delete an object from the object repository?

588


How to use transactions in qtp?

553


Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?

1550


How to execute a winrunner script in quicktest professional?

550


How to modify the text checkpoint?

609






how to acess a test in RSA?

1661


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1531


I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=", Second button "html id:=btnSave "outerhtml:=", Third button "html id:=", outerhtml:=",

1343


www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example

1722


How many add-ins comes by default with qtp?

529


Discuss quicktest professional environment?

582


Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

1345


which type of testing process are you following in ur company? how to recognize a qtp page?

1397


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

911


can u please explain what is the exact difference between qtp8.2 and 9.0

1675