
如果带有注释的方法
@AfterMethod具有
ITestResult参数,则TestNG将自动注入测试结果。(来源:TestNG文档,第5.18.1节)
这应该做的工作:
@AfterMethodpublic void tearDown(ITestResult result) { if (result.getStatus() == ITestResult.FAILURE) { //your screenshooting pre goes here } }欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)