how can i parameterize a login page by using database
parameterization i fetch the username and password from
database and put this on login page and click on ok button.
so how can we write script for that code please let me know
asap

thanks

Answers were Sorted based on User's Feedback



how can i parameterize a login page by using database parameterization i fetch the username and pas..

Answer / shaveta

rc=datatable.GetSheet("Global").GetRowCount
For i=1 to  rc
datatable.GetSheet("Global").SetCurrentRow(i)
systemutil.Run"C:Program FilesHPQuickTest Professionalsamplesflightappflight4a.exe"


With dialog("Login")
.Activate
.WinEdit("AgentName:").Set(datatable.Value("UID","Global"))
.WinEdit("Password:").Set(datatable.Value("password","Global"))
.WinButton("OK").Click
End With
window("Flight Reservation").Close
Next

Is This Answer Correct ?    1 Yes 0 No

how can i parameterize a login page by using database parameterization i fetch the username and pas..

Answer / shaveta

rc=datatable.GetSheet("Global").GetRowCount
For i=1 to  rc
datatable.GetSheet("Global").SetCurrentRow(i)
systemutil.Run"C:Program FilesHPQuickTest Professionalsamplesflightappflight4a.exe"
With dialog("Login")
.Activate
.WinEdit("AgentName:").Set(datatable.Value("UID","Global"))
.WinEdit("Password:").Set(datatable.Value("password","Global"))
.WinButton("OK").Click
End With
window("Flight Reservation").Close
Next

Is This Answer Correct ?    1 Yes 0 No

how can i parameterize a login page by using database parameterization i fetch the username and pas..

Answer / pravati

Rowcount=Datatable.Getsheet(shtID).Getrowcount
for i=1 to rowcount
Datatable.Getsheet(shtID).setcurrentrow(i)
username=Datatable.value(rowid1,sheetid)
pwd=Datatable.value(rowid2,sheetid)
Browser().page().webedit().set username
Browser().page().webedit().set pwd
Browser().page().webbutton.click

Is This Answer Correct ?    0 Yes 0 No

how can i parameterize a login page by using database parameterization i fetch the username and pas..

Answer / pravati

Rowcount=Datatable.Getsheet(shtid).getrowcount
for i=1 to rowcount
Datatable.Getsheet(shtid).setcurrentrow(i)
username=Datatable.value(rowid1,shtid)
pwd=Datatable.value(rowid2,shtid)
Browser().page().webedit().set username
Browser().page().webedit().set pwd
Browser().page().webbutton.click
next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Can any body tell me how can I choose the share object repository and per action object repository mode. Please give me with steps.

4 Answers  


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

0 Answers  


Can we directly automate testscripts accrdoing to requirements? WHY ?

1 Answers  


What is use of Global Sync Timeouts in QTP9.2?

2 Answers  


This is the script generated by qtp plz can anyone write the same script using descriptive programming plzzzz guys do answer. Browser("orkut - login").Page("orkut - login").WebEdit ("Email").Set "rgovard" Browser("orkut - login").Page("orkut - login").WebEdit ("Passwd").SetSecure "47525d8be4926ea2f6e96b9a3f7472b6ae38" Browser("orkut - login").Page("orkut - login").WebButton ("Sign in").Click Browser("orkut - login").Page("orkut - home").Link ("Logout").Click Browser("orkut - login").Page("orkut - login").Sync Browser("orkut - login").Close

6 Answers  






When to use descriptive programming?

0 Answers  


How do you start automating/ writing your QTP scripts ?

3 Answers   Keane India Ltd,


what frame work you are following?

0 Answers   Wipro,


what is automation(qtp)bug pls giv me one ex?

1 Answers  


How do you test DLL files using automation Tool QTP?

0 Answers   Qwest,


we are submitting data one form to another form.defaultly it is time period set as 5sec. but it is taken 15sec what to do

5 Answers   Covansys,


QTP identifying the child tabs in a maintab like tab_1,tab_2,tab_3,tab_4 while using a for loop for these tabs.its not proceeding from _1 to _2. How can i use "for loop "

2 Answers   Livetek,


Categories