Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is Reporter ignoring the status of steps?
#1
Solved: 11 Years, 4 Months, 3 Weeks ago Question 
I've tried to use the Reporter.ReportEvent mic Fail to write the status of step only If Step has failed. If no error occurs "MicDone" should be use or simply continue with the next step.

My problem is that the Script is not recognizing the If Statement and is writing the Reporter.ReportEvent mic Fail even if the Result of the Status is Passed.

Any of your excellent help will be appreciated. Thanks in advance.

Here is my code:
Code:
For x = 1 to datatable.LocalSheet.GetRowCount
             datatable.SetCurrentRow x
    Browser("QNXT 4.62.00.061").Page("QNXT 4.62.00.061").Link("Benefit Plans").Click
        Browser("QNXT - Benefit Plan Module").Page("QNXT - Benefit Plan Module").Frame("Frame").WebList("ddlMainProgram").Select datatable("DT_ProgramCategory", "Action1")

   If Reporter.RunStatus = micFail and x = datatable.Value ("DT_ID") Then
   Reporter.ReportEvent micFail, "Custom Step", "Program Category Failed in step # " & x
   Else
Reporter.ReportEvent micDone, "Passed", "Passed"
   End If

             Browser("QNXT - Benefit Plan Module").Page("QNXT - Benefit Plan Module").Frame("Frame").WebList("ddlProgram").Select datatable("DT_Program", "Action1")

Wait 1

             Browser("QNXT - Benefit Plan Module").Page("QNXT - Benefit Plan Module").Frame("Frame").WebList("ddlBenefitPlan").Select datatable("DT_BenefitPlan", "Action1")


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi ,

Try using the below ,

if Reporter.RunStatus = "micFail" then

OR
if Reporter.RunStatus = 1 then ''// here 1 means micfail


Thanks,
Harish Shenoy
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks for your help. It partially works.

Since the test is inside a For Next Loop the Reporter.RunStatus = 1 works until one step fail. If one step fail the other records failed too.

Is there any way to reset the Reporter.RunStatus after each loop? or maybe a workaround to avoid all records fail after the first error.

Thanks,
Danny Laureano
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
the best way to use err.number <> 0. in case of any error err.number value would be anything other then 0.

Once you are at the end of the loop you can use err.clear to set it default.
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
  UFT Hangs on certain steps mjako64 0 1,133 07-09-2019, 03:03 PM
Last Post: mjako64
  Unexpected Behavior of Reporter.Reportevent chinmaya chirasundara nayak 3 3,821 12-03-2013, 10:43 AM
Last Post: kotaramamohana
  QTP Automation: How to retrieve Reporter.Reportevent Message scsenthil 1 5,458 11-14-2013, 07:51 PM
Last Post: spannerj
  Write Status of each row in DataTable dlaureano 2 3,562 11-29-2012, 05:53 PM
Last Post: dlaureano

Forum Jump:


Users browsing this thread: 1 Guest(s)