Hi,

I am using the following code to drive the script from Datasheets, but i am unable to run the second iteration using the 2nd rows in the datasheets. Please Help!!!

''''''''''''''''''''''''''''''''''''''Add Sheets to QTP Datatable''''''''''''''''''''''''''''''''''''''''' '''''''''
Datatable.AddSheet("Page1")
Datatable.AddSheet("Page2")
Datatable.AddSheet("Page3")
''''''''''''''''''''''''''''''''Import Data to Imported Sheets'''''''''''''''''''''''''''''''''''''''''''' ''''''
Datatable.ImportSheet "I:\Self test\Data\Data.xls","Page1","Page1"
Datatable.ImportSheet "I:\Self test\Data\Data.xls","Page2","Page2"
Datatable.ImportSheet "I:\Self test\Data\Data.xls","Page3","Page3"
''''''''''''''''''''''''''''''''''''''''''''Get Sheet for Page 1''''''''''''''''''''''''''''''''''''''''''''''''' ''''''
Datatable.GetSheet("Page1")
''''''''''''''''''''''''''''''''''''''''Page 1: What can I afford'''''''''''''''''''''''''''''''''''''''''''' ''''''
'Monthly payment
Browser("Auto Calculators").Page("1. Auto Calculators").WebEdit("Monthly Payment").Set Datatable.Value ("MonthlyPayment" , "Page1")
Browser("Auto Calculators").Page("1. Auto Calculators").WebButton("Go").Click
'''''''''''''''''''''''''''''''''''''''''''Get Sheet for Page 2''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Datatable.GetSheet("Page2")
'''''''''''''''''''''''''''''''''''''Page 2: How much car can I afford?''''''''''''''''''''''''''''''''''''
'Zip Code
Browser("Auto Calculators").Page("2. How much car can I afford?").WebEdit("Zip Code").Set Datatable.Value("ZipCode" , "Page2")
Browser("Auto Calculators").Page("2. How much car can I afford?").WebButton("Update Zip Code").Click
'Financing
Browser("Auto Calculators").Page("2. How much car can I afford?").WebList("Loan Term").Select "72 months"
Browser("Auto Calculators").Page("2. How much car can I afford?").WebEdit("Market Finance Rate").Set Datatable.Value("MarketFinanceRate" , "Page2")
'Trade-In and Down Payment
Browser("Auto Calculators").Page("2. How much car can I afford?").WebEdit("Value of Your Trade-In").Set Datatable.Value("ValueOfYourTradeIn" , "Page2")
Browser("Auto Calculators").Page("2. How much car can I afford?").WebEdit("Amount Owed on Your Trade-In").Set Datatable.Value("AmountOwedOnYourTradeIn" , "Page2")
Browser("Auto Calculators").Page("2. How much car can I afford?").WebEdit("Cash Down Payment").Set Datatable.Value("CashDownPayment" , "Page2")
'Calculate
Browser("Auto Calculators").Page("2. How much car can I afford?").WebButton("Calculate").Click
wait 12
Browser("Auto Calculators").Page("2. How much car can I afford?").Link("Auto Loan Calculator").Click
'''''''''''''''''''''''''''''''''''''''''''Get Sheet for Page 3''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Datatable.GetSheet("Page3")
'''''''''''''''''''''''''''''''''''Page 3: Auto Loan Calculator''''''''''''''''''''''''''''''''''''
'Zip Code
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Zip Code").Set Datatable.Value ("ZipCode","Page3")
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebButton("Update Zip Code").Click
wait 2
'Vehicle Costs
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Vehicle Sales Price").Set Datatable.Value ("VehicleSalesPrice","Page3")
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Sales Tax").Set Datatable.Value ("SalesTax","Page3")
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Title and Registration").Set Datatable.Value ("TitleandRegistration","Page3")
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Incentives and Rebates").Set Datatable.Value ("IncentivesandRebates","Page3")
'Trade-In and Down Payment
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebButton("Select Trade-In").Click
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Value of Your Trade-In").Set Datatable.Value ("ValueofYourTradeIn","Page3")
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Amount Owed on Your Trade-In").Set Datatable.Value ("AmountOwedonYourTradeIn","Page3")
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Cash Down Payment").Set Datatable.Value ("CashDownPayment","Page3")
'Loan Financing
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebList("Loan Term").Select "#3"
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebEdit("Market Finance Rate").Set Datatable.Value ("MarketFinanceRate","Page3")
'Calculate
Browser("Auto Calculators").Page("3. Auto Loan Calculator at").WebButton("Calculate").Click
wait 12
Browser("Auto Calculators").Close
Datatable.SetNextRow
SystemUtil.Run "iexplore.exe", "http://www.edmunds.com/calculators", "C:\Program Files\Internet Explorer\", "open"