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
How to delete an object from the object repository?
How to use transactions in qtp?
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?
How to execute a winrunner script in quicktest professional?
How to modify the text checkpoint?
how to acess a test in RSA?
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>.
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:=",
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
How many add-ins comes by default with qtp?
Discuss quicktest professional environment?
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
which type of testing process are you following in ur company? how to recognize a qtp page?
Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji
can u please explain what is the exact difference between qtp8.2 and 9.0