Imagine that you have a number of tests that work on a site that requires you to log in and move to a certain page. Or imagine that you need to have a test that requires you to be on a certain page. In these two situations the quickest way to find out which page you are on and then move to the correct one if need be, is to start testing. This is to make sure that we follow one of the major tenants of test automation, in that you always start from a known place. Let us see this in an example:
Create a new Java class in IDEA:
teardown()method. I prefer the JUnit 4 style of tests and will show code samples with the annotations.