TestNG is an automation framework mostly used in Selenium automation scripts for Web applications.It is very important to understand the annotations while working with TestNG for Selenium WebDriver. Testng providing suitable annotations to prepare Test scripts in Selenium WebDriver where you can pass test data from different files such as Excel,XLS files and You can run the scripts before tarting the class Method etc.
|TestNG Annotations in Selenium|
TestNG has below annotations those are
@BeforeSuite: This annotation method will be run before all tests in this Test suite have to run.
@After Suite: This annotated method will be run after all tests in this Test suite have to run.
@BeforeTest: This annotated method will run before any test method which is belongs to the classes inside the test tag.
@After Test: This annotated method will be run after all the test method which is belongs to the classes inside the test tag have to run.
@BeforeClass: This annotated method will run before the first test method in the current class is invoked.
@After Class: This annotated method will be run after all the test methods in the current class have run.
@BeforeMethod : This annotated method will be run before each test method.
@AfterMethod: This annotated method will be run after each test method.
Please provide your valuable comments on this post and provide any suggestions in order to get users experience ,so that i can improve the site content to understand easily.Thank you for reading my blog.
Verify Element is Enable
Selenium Xpath Tutorial
Selenium DataDriven Framework