My afterMethod consists of this:
@AfterMethod(groups = { "Regression" }) public void afterMethod() { // Setting driver used to false as this test case is pass driverUsed.put("supportDriver", false); System.out.println("Test case is pass"); } where I am putting the driver false
But I want to run this afterMethod only when my @Test is passed, not when @test fails.