I have method which contains multiple Assertions, all are passing except last one and it shows all the assertion messages even if it is passed. Does anybody knows how to resolve such condition and how can i get only failure message instead of all messages in console.
Assertions.assertThat(actual.getAttribute("id").isEqualTo("first_name");
Assertions.assertThat(actual.tagName()).isEqualTo("input");
Assertions.assertThat(actual.getAttribute("class")).isEqualTo("input-group");
Assertions.assertThat(actual.getText()).isEqualTo("John");
The above is the code which i have written and all condition are getting passed except last but it shows like this as mentioned below.
Expected actual to be first_name but got <first_name>
Expected actual to be input but got <input>
Expected actual to be input-group but got <input-group>
Expected actual to be Johny but got John
Actually last statement is failure but it shows all the messages as above even if that conditions have got passed.