top of page

Exception handling - Fail
don't use with explicit wait
try {
br = new BufferedReader(new FileReader("Data"));
}
catch(Exception ie){
syso.( ie.printStackTrace());
syso.(ie.getmessage());
//אכי טוב לשים
syso(ie);
}
//Finally - something to do always if passing or failing
Finally {
syso.("mane test");
// כאן לא שמים פונקצית recovery
// עדיף להישתמש ב- After@
}
@After
//go to main page or go to starting point(for next test)
recoveryScenario();
בכדי לתפוס שגיאות של Assert צריך להוסיף AssertionError
try {
}
catch (IOException e) {/// גם
}
catch(AssertionError ie){/// וגם
System.out.println("failr"+ ie);
}
catch(Exception ie){///Exception תופס גם שגיאות הידור
System.out.println("failr"+ ie);
}
bottom of page