adspace


Explain the meaning of the statement in Selenium and what are the types of assertion?

Answer Posted / Surendra Singh

In Selenium, a statement is an action performed on a web element. Assertions, on the other hand, are used to check if the expected outcome of a statement has occurred. There are two main types of assertions in Selenium: hard assertions (`assert`) and soft assertions (using TestNG's `AssertJUnit` or JUnit 5's `Assertions`). Hard assertions will cause the test to fail immediately if the assertion fails, while soft assertions allow you to group multiple assertions and report them all at once.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Have you created any framework?

1048


What’s selenese?

924


Do you know how to locate a link using its text in selenium?

996


what will be the first salary and what will be the hike in the salary?

938


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

1204