Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write Status of each row in DataTable
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi, I'm new to QTP and using QTP11.

I'm processing a thousand records and every time a row is processed I need to put a "Passed" or "Run Time Error" next to each current row in the Action1 Sheet of the DataTable. I already have this code(see below) which use the Reporter and is also writing to the DataTable, but instead of writing next to each Row is creating a New Column every time a record is processed.

I'll really appreciate your advice and give me some example of what I need.

Code:
If Browser("QNXT - Benefit Plan Module").Window("About QNXT -- Webpage").Page("About QNXT").Frame("Frame").WebButton("Cancel").Exist Then
    Reporter.ReportEvent micPass, "Record Verification", "Record has been saved"
    DataTable.GlobalSheet.AddParameter "A", "Passed"
Else
    Reporter.ReportEvent micWarning, "Record Verification", "Record not Completed"
    DataTable.GlobalSheet.AddParameter "A", "Run Time Error"
End If
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hope you are executing ur code in for loop. The below code always write in Global sheet

Code:
For i = 1 to 3

If  Browser("QNXT - Benefit Plan Module").Window("About QNXT -- Webpage").Page("About QNXT").Frame("Frame").WebButton("Cancel").Exist Then
    DataTable.SetCurrentRow(i)
    DataTable("Result") = "Passed"
Else
    DataTable("Result") = "Run Time Error"
End If

Next
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Excelent! It works! Thanks a lot.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to close/restart UFT in "Not responding" status with AOM script CharlieMadrid 0 1,252 05-21-2020, 08:46 PM
Last Post: CharlieMadrid
  Searching for and selecting row in Datawindow zsl0009 0 2,839 08-04-2015, 01:02 AM
Last Post: zsl0009
Question Is Reporter ignoring the status of steps? dlaureano 3 3,711 06-05-2014, 01:38 PM
Last Post: Jay
  data sheet row count rushil 2 7,693 12-07-2012, 03:10 AM
Last Post: rushil
  How to recognize table row and column siwani 4 5,137 04-05-2012, 05:06 PM
Last Post: verma.vik6

Forum Jump:


Users browsing this thread: 1 Guest(s)