Q. What is the purpose of @BeforeMethod in TestNG?
Solution:
@BeforeMethod runs setup code (e.g., opening a browser) before each test method.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
@BeforeMethod runs setup code (e.g., opening a browser) before each test method.
Strengthen Your Practice with our comprehensive question bank.