2016-08-08 9 views

Antwort

0

Meinst du sowas?

public class MyHook implements IHookable { 

    private static boolean failed = false; 

    public void run(final IHookCallBack icb, ITestResult testResult) { 
    if (failed) { 
     return; 
    } 

    try { 
     icb.callback(testResult); 
    } catch(Exception ex) { 
     failed = true; 
    } 
    } 
} 
+0

Hallo Danke für die Antwort. Ich habe Selen-Skript durch testNG verwendet, wo, wenn es unerwartete Dinge wie "NoSuchElementException"/"NoAIertPresentException" passiert, wollte ich forceNG durch Code zwangsweise stoppen. – Manikandan

Verwandte Themen