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);

}

Selenium - izselenium aoutomation tool

054-8059589

  • White Facebook Icon
  • White Twitter Icon
  • White Google+ Icon
  • White YouTube Icon

© 2017 by izselenium

bottom of page