public class SettingsTest extends Retry { WebDriverWait wait; SetUpUtil setUpUtil = new SetUpUtil(); DesiredCapabilities caps = new DesiredCapabilities(); ISCBPageHelper iscbPageHelper; /** * * @throws IOException */ @BeforeClass(alwaysRun = true) public void beforeTestClass() throws IOException { String className = this.getClass().getSimpleName(); setUpUtil.beforeTestSuite(className); } /** * Configure Test Params setting. * * @param testContext * @throws MalformedURLException */ @BeforeMethod(alwaysRun = true) public void beforeMethod(Method method, final ITestContext testContext) throws MalformedURLException { String testName = method.getName(); setUpUtil.beforeTestMethod(testName); //When we want to make use of NO_RESET and FULL_RESET capabilities in SetUpUtil, we should pass a 'true' flag driver = setUpUtil.beforeTest(testContext, caps, driver, MiscellaneousPageConstants.RESET_FLAG_FALSE); driver.startRecordingScreen(); } @AfterTest(alwaysRun = true) public void afterTest() throws Exception { driver.closeApp(); } @Test(priority = 0) public void testSettingsScreen() { this.init(driver); driver.findElementByName("abc").isDisplayed(); } }