In the example above, we had launched the application and verified its page titleSelenium Practice - Linksusing the assertions commandverify title. Then clicked on theCreatedlink, and waited for textLink has responded with status 201 and status text Createdto be visible with the assertion command...
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 ...
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...