Is Reporter ignoring the status of steps? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Is Reporter ignoring the status of steps? (/Thread-Is-Reporter-ignoring-the-status-of-steps) |
Is Reporter ignoring the status of steps? - dlaureano - 12-04-2012 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 RE: Is Reporter ignoring the status of steps? - harishshenoy - 12-04-2012 Hi , Try using the below , if Reporter.RunStatus = "micFail" then OR if Reporter.RunStatus = 1 then ''// here 1 means micfail Thanks, Harish Shenoy RE: Is Reporter ignoring the status of steps? - dlaureano - 12-06-2012 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 RE: Is Reporter ignoring the status of steps? - Jay - 06-05-2014 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. |