Since you have caught the error, this will not fail. I recreated the situation as following. This did not fail. But a Throwable is thrown. Error is printed.
public class TNG {
WebDriver driver;
@Test
public void googleSearch(){
System.setProperty("webdriver.chrome.driver", "path to web driver");
driver = new ChromeDriver();
driver.get("http://www.google.co.in/");
System.out.println(" ---------- Start -------------");
try {
Assert.assertTrue(driver.findElement(By.xpath("xyz")).isDisplayed(), "unable to find the link");
} catch (Throwable t) {
System.out.println("Error");
}
System.out.println(" ---------- End -------------");
}
@Test
public void anotherTest(){
System.out.println("another test");
}
}
Following is the result from the execution of the test.
another test
Starting ChromeDriver 2.30.477700 (0057494ad8732195794a7b32078424f92a5fce41) on port 43423
Only local connections are allowed.
Jul 20, 2017 5:55:33 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
---------- Start -------------
Error
---------- End -------------
PASSED: anotherTest
PASSED: googleSearch
===============================================
Default test
Tests run: 2, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 2, Failures: 0, Skips: 0
===============================================
And if you want to continue test execution even though some tests failed , you can simply write methods with @Test annotation like the anotherTest() method that I have created. But you can not guarantee the order of the test execution.
In here above anotherTest() has been executed first.