Hi Tarun,
I have tried Soft assertion and my test is getting passed.
It is showing test passed (in green) in soft assertion
method:
public static void raiseException(String exp, String act) {
try {
takeSnapShot();
//Assert.fail("Page did not open");
Assert.assertTrue(exp.equalsIgnoreCase(act));
} catch (Error t) {
errcol.append(t);
Reporter.log("Error: "+"expted: "+exp +" ; "+ "Actual: "+act);
}
}
After catching error, it is printing message in report but in console, it is showing test passed