Tuesday, May 29, 2018

BeforeMethod, AfterMethod, BeforeClass and AfterClass annotations.

TestNG provides us with number annotations to customize the test execution flow or process as per our requirement. And some of the annotations will help us to avoid code duplication and achieve code re-usability in the framework.

In this  post  we will learn about code reusability using the annotations @BeforeMethod, @AfterMethod, @BeforeClass and @AfterClass. Checkout the functionalities below.

@BeforeMethod: A method associated with this annotation will always be executed before every @Test annotated method. Application launch, Login and etc. functionalities can be put in this methods

How do you identify broken links in Selenium Automation?

When we are asked to identify the broken links in the application, what we do? Collecting all the links on the page to a list and looping t...