In our earlier tutorials, we have already discussed exceptions in Java. These are the errors that are caught at runtime. Similar to exceptions there are some other constructs that we can use at compile time to test the correctness of code. These constructs are called “Assertions”. In this ...
Step 8 − Click on Run all tests from the top, and hold back for the test execution to end.In the example above, we had launched the application and verified its page title Selenium Practice - Links using the assertions command verify title. Then clicked on the Created link, and waited...
Performing a certain operation whenever an assertion fails (for example, taking a screen shot of the browser, as is often required in Selenium). I decided that the time had come to revisit assertions in order to make it more flexible so it can accomodate all these real world scenarios. The...