How to continue execution when Assertion is failed

前端 未结 5 1516
小鲜肉
小鲜肉 2020-11-28 12:42

I am using Selenium RC using Java with eclipse and TestNG framework. I have the following code snippet:

assertTrue(selenium.isTextPresent(\"Please enter Emai         


        
5条回答
  •  無奈伤痛
    2020-11-28 13:16

    Once an assertion fails, execution should stop, that's the point of using them.

    You can declare an assertion that tests both things, but then you're testing two things at once. Better to fix the cause of the first failure, then move on to the second assertion.

提交回复
热议问题