Hello,
I want to do a recovery scenario in case my previous test is failed.
In the listeners I would like to check if an object exists.
In the @AfterTestCase if I am on the login page then everything is OK, otherwise I have to close my application.
In my code findTestObject is underline and not recognized.
In y listener :
@AfterTestCase
def AfterTestCaseRC(TestCaseContext testCaseContext) {
def bPageLogin = Mobile.verifyElementExist(findTestObject(‘Object Repository/login_editText’),1, FailureHandling.OPTIONAL)
if (bPageLogin) {
Mobile.comment(‘nothing to do’)
} else {
Mobile.closeApplication()
}
}
}