Hello,
I’m new to Katalon and working on App testing.
Can anyone help me on how to compare the mobile screens.
Compare the mobile screens and execute related statements.
i have tried using VerifyElementExist and VerifyMatch and also used if else statements using objects xpath.
def serverlocation = new TestObject()def loginpage = new TestObject()def test = serverlocation.addProperty("xpath",ConditionType.EQUALS,"//hierarchy/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.view.View[1]")def test1 = loginpage.addProperty("xpath",ConditionType.EQUALS,"//hierarchy/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.widget.ScrollView[1]/android.view.View[1]/android.view.View[1]/android.view.View[3]")if (Mobile.verifyElementExist(test, 0, FailureHandling.OPTIONAL)) { Mobile.tap(findTestObject('Object Repository/app_1/1_select_Existing_User'), 0) Mobile.tap(findTestObject('Object Repository/app_1/1-select_Ok'), 0) }else if (Mobile.verifyElementExist(test1, 0, FailureHandling.OPTIONAL)){ Mobile.setText(findTestObject('Object Repository/app_1/2_enterEmail'),'hello@gmail.com', 0)}
Thanks in Advance !!!