02-25-2009, 11:49 PM
the idea was to load columns that match the raw data from loadrunner that I am gathering so I could extrapolate the page rendering time rather than having to cut rows and paste them into columns manually. the following solution worked:
Code:
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Workbooks.Add
Set ExcelSheet = ExcelApp.ActiveSheet
...
While intIteration < 30
...
MercuryTimers("Save").Start
Browser("WebBrowser").Page("WebPage").Link("Save").Click
Browser("WebBrowser").Page("WebPage").WebElement("Success").CheckProperty "visible", True, 30000
intSave= MercuryTimers("Save").Stop
...
Services.SetTransaction "Iteration",intIteration, Pass
labels = Array("Login", "Mainpage","Search", "Save", "Logout")
results = Array(intLogin, intMainpage, intSearch, intSave, intLogout)
For i=0 to 4
results(i) = results(i)/1000
ExcelSheet.Cells(intIteration,i+1).Value = results(i)
Services.SetTransaction labels(i), results(i), Pass
Next
...
Wend
...
ExcelSheet.SaveAs "C:\Automation Data\SingleUser.xls"
ExcelSheet.Application.Quit
Set ExcelSheet = Nothing