How can i stop the execution of a test case if an exception happen and caught and move to next one. I am using TestNG, Eclipse, Selenium. In my xml, i have:
<?xml version="1.0" encoding="UTF-8"?>
<suite name = "Regression Suite" >
<listeners>
<listener class-name="Utility.Listener"></listener>
</listeners>
<test name = "Regression">
<classes>
<class name = "Scripts.TestNG_Temp"/> -->
<class name = "Scripts.CreateAppointment"/>
</classes>
</test>
</suite>
@Test
public void main(){
try{
driver.findElment(by.name("textbox)).click();
}cuaght(ElementNotFoundException e){
//here i want to stop the execution of my test case, close the browser & move to next one.
}