Create a new project. Add abstract class TestBase. In beforeTest you need to create driver and open tested web page. In afterTest you need to tear down your web driver.
For taking screenshots we need to use @AfterMethod annotation, because we need to create screenshot after each test method. Continue reading