Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to capture QTPs results for each step
#4
Not Solved
If your requirement is to pass the values to an external excel sheet then you will have to exploit the Excel COM object.
Code:
Set oExcel = CreateObject("Excel.Application")
Set oWorkbook  = oExcel.Workbooks.Open(sExcelpath)
Set oWorksheet = oWorkbook.Worksheets(1)

If ..("Window"). ..("Screen"). ..("Field"). = "desired result" Then
oWorksheet.Cells(1, 4).Value = "Pass"
Else
oWorksheet.Cells(1, 4).Value = "Fail"
End If

This would write in the 1st row, 4th column provided that is your results column. If you want to write it for all the tests please iterate through a For loop and use the counter in place of the row.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Messages In This Thread
RE: How to capture QTPs results for each step - by basanth27 - 09-02-2009, 08:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP does not record the first step of open filight reservation application. Blossoms 9 18,067 07-20-2015, 05:50 PM
Last Post: AJAJ
  step by step report shipu 0 2,257 08-06-2014, 02:21 AM
Last Post: shipu
  which is the final step of automation in QTP? Ramadas 6 4,150 10-29-2013, 04:31 PM
Last Post: Sathiya
  QTP is not recording the first step of opening Flight reservation app srinanduri 2 3,333 08-06-2013, 09:59 PM
Last Post: srinanduri
  How to continue test after it fails a step sqadri 4 4,672 01-20-2012, 10:02 PM
Last Post: sqadri

Forum Jump:


Users browsing this thread: 1 Guest(s)