How to parameterize the data in QTP ..?I have used Data Driver to parameterise.In Script it is showing like DataTable("DataTablesysadmin_param_dtGlobalSheet1", dtGlobalSheet)Browser("Browser").Page("Login").WebEdit("password").Set DataTable("DataTablesysadmin_param_dtGlobalSheet1", dtGlobalSheet)Problem is In the datatable columns i have given 4 values for user name but it is working for the first row.loop is not rotating for the next ?my doubt is like in winrunner do we need to write a loop to execute this datatable values in QTP..

Showing Answers 1 - 3 of 3 Answers

mallika neelam

  • Sep 7th, 2006
 

for i=1 To 5

DataTable.SetCurrentRow(i)

Browser("...").Page("..").WebEdit("...").Set DataTable("Column name", dtGlobalSheet)

Next

  this step DataTable.SetCurrentRow(i) will point to a particular row in the global sheet

  Was this answer useful?  Yes

kaivalya

  • Dec 19th, 2006
 

Hi

According to my knowledge and experience in QTP there is no need to write loop in QTP. In your case check the properties of the test and see whether it is marked to iterate to all the rows or only first row.

No need to write the additional for loop

  Was this answer useful?  Yes

sravanthy

  • Feb 9th, 2007
 

Hai As of my knowledege no need loopEneter the data in Global sheet i.especify as UID, PWD and enter the mutilpe datas to test. and on Script generation

Dim UID,PWD
Call login()
Function Login()
Browser("Browser").Page("Page_2").WebEdit("loginName").Set DataTable("UID", dtGlobalSheet)

Browser("Browser").Page("Page_2").WebEdit("loginPassword").Set DataTable("PWD", dtGlobalSheet)
Browser("Browser").Page("Page_2").WebButton("Submit").Click
Browser("Browser").Page("Page_2").Sync
Browser("Browser").Page("Page_2").Check CheckPoint("Login validation failed:-User")
Browser("Browser").Page("Page_2").WebElement("Login validation failed:-User").Output
CheckPoint("Login validation failed:-User_2")
End Function

without using loop your function would easily executed for the ittrations

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions