06-02-2010, 06:15 PM
Hi,
I have written the below code to do some hands-on for parameterization:
From the Settings, I have changed the option in the Run tab to "Run on all rows", but still this block of code gets executed only once.
There are 20 values getting imported from the external file. I thought QTP automatically takes up the next row value and runs all the iterations. Please help me.
Thanks,
Vijayendra.
I have written the below code to do some hands-on for parameterization:
Code:
DataTable.ImportSheet "C:\Documents and Settings\a8vs9\Desktop\Vijayendra\Data_Transfer_QTP.xls", "Sheet1", "Global"
If DataTable.GlobalSheet.GetCurrentRow = 1 Then
SystemUtil.Run "IEXPLORE.exe", "http://www.google.com"
End If
iValue = DataTable.Value("LN_NBR", dtGlobalSheet)
With Browser("title:=Google", "index:=0").Page("title:=Google", "index:=0")
.WebEdit("name:=q").Set DataTable("LN_NBR")
.WebEdit("name:=q").Submit
End with
If Browser("title:=" & iValue & " - Google Search", "index:=0").Exist(10) Then
Reporter.ReportEvent micPass, "Iteration " & DataTable.GlobalSheet.GetCurrentRow, "This iteration " & DataTable.GlobalSheet.GetCurrentRow & " is ok."
' Browser("title:=" & iValue & " - Google Search").Back
Browser("title:=" & iValue & " - Google Search").Navigate "http://www.google.com"
End If
From the Settings, I have changed the option in the Run tab to "Run on all rows", but still this block of code gets executed only once.
There are 20 values getting imported from the external file. I thought QTP automatically takes up the next row value and runs all the iterations. Please help me.
Thanks,
Vijayendra.