How can I get the run result status according to the current report node?

后端 未结 3 726
自闭症患者
自闭症患者 2021-01-12 19:17

For example, suppose a test calls two actions, A and B. A performs a \"failed\" step by calling \"Reporter.ReportEvent micFail, ...\", and B performs a \"passe

3条回答
  •  隐瞒了意图╮
    2021-01-12 19:52

    If you want to update the per Action Status at run time...

    'append "Err.clear" at the start of the action and

    if Err.Number<>0 Then
    'update your action status to Failed'
    End if
    

    at the end of the action. This will occur provided you don't clear the Err.number manually

    What it does is if any run time error occurs Err.number gets changed and you can use this to get any run time errors at run time itself. Hope this helps :)

提交回复
热议问题