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
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance
What is Associate Repository in QTP 9.2 ?
Which functionalities of QTP used in banking project? pls any say answer?
What is environment variable in qtp and why to use it?
I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }
Hi All, I need code for how to execute qtp scripts from excell sheet
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
For the below written code , i want to be stop the loop (ex:10 times), but it is focusing to first line of the code & generating error. vbwindow("vbname:=frmMain").Type micAltDwn + "6" + "2" + "D" +micAltUp 'wiil open the particular window in application vbwindow("vbname:=frmDeduction").vbbutton("vbname:=cmdNew").Click DataTable.ImportSheet"F:\QTP VBScript\Form 26-1.xls","Deduction",Global RowCount = DataTable.GetSheet("Global").GetRowCount i=RowCount For j =1 to i 'vbwindow("vbname:=frmDeduction").WinObject("nativeclass:=DataComboWndClass","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type DataTable("Section", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micTab vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtOfPay").Set DataTable("Amount_of_Payment", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Set DataTable("Amount_PaidCredited_Date", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type DataTable("Deduction_is", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micTab vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdSave").Click DataTable.SetNextRow Next vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdClose").Click
Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.
Define Error Pane of UFT?
What is the quicktest professional (qtp) testing process?
how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)
What are output values and why they are used ?
how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?