what is synchronization point, synchronization method, wait
property method? with examples.. plz explain this in brief

Answer Posted / nilanjan saha

Hi ,

The name "Synchronization Point" itself says it all.Actually
it is nothing but to inform QTP to wait till some specified
condition occurs. You can specify the conditions.

We need Synchronization Point because we are always not sure
how much time it takes for an Object to get loaded to a
page/window.

Let's take an example of "Login" page of any application.
You want to provide "UserName" in the UserName field after
opening the site via QTP.We can provide value only after
"UserName" field is visible. But sometime it may take 10
seconds for the "UserName" field to be appear in the Login
page. Sometime it may take 30 seconds (Depends upon the
internet speed).At this point QTP script fails as the object
is not displayed in the page. So here what we do through
"Synchronization Point" is to tell QTP to wait untill the
"UserName" field appears on the page, may it take 10 secs or
30 secs.


There are 2 ways (for Web Application) you can acheive this
as follows:

Quote:> Browser("").Sync (Only in case of Web App) : QTP
waits untill all the objects are loaded to the Browser

> WaitProperty (Any type of App) : QTP waits untill the
specified condition is satisfied

Following is an example of "WaitProperty"

Quote:Syntax: Object.WaitProperty "Property
Type","Property Value",TimeOut

Ex:
Browser("Login").Page("Login").WebEdit("UserName").WaitProperty
"visible",True,20000

It means that QTP will 20000 ms ,by that time if that above
editbox appears then script will run the rest of the scripts
. If in the mean time that editbox field appears with in 10
sec, then QTP will stop waiting and will continue with the
script, so thats how extra 10 secs will be not wasted.

But is case some one give hard-coded Wait(20) , then anyhow
QTP will wait for mentioned 20 sec even that editbox got
loaded earlier.


Hope that above explanation will help.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why qtp always start action1 and does not start action?

765


I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1650


What is qtpro?

757


How to record application running on the Virtual machine?

799


Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.

2558






what r the main attributes of test automation?

1648


What is the use of sendkeys and what are send keys

2122


Explain in brief about the qtp automation object model (aom).

685


before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...

7522


How to indentify MS-Word objects like Menubar, Toolbar, table/columns/rows/cells etc within Word document, using QTP?

2000


How many types of parameters are there?

688


whow much strong on VB and C?

1636


How to export quicktest professional results to an .xls file?

732


What are the key elements available in test result window?

790


describe some problems that u had with automating testing tool?

1536