12-04-2012, 12:05 AM
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:
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")