krGlobalPage.softAssertionTestCall2(softAssertion);
has to run even afterkrGlobalPage.softAssertionTestCall1(softAssertion);
is failed due to
Asked
Active
Viewed 1,332 times
1 Answers
1
The way that I have found best - and also to show in Allure report as fail - is to try-catch the findelement and in the catch block, set the assertTrue to false, like this:
try {
driver.findElement(By.xpath("(//nav[@class='topline']//nav[@class='without-seperator1']/a)[1]");
}catch(Exception e) {
assertTrue(false, "Test Search link was not displayed");
}

Amr El Massry
- 371
- 3
- 4