Mobile Testing - Get the text and compare with the Expected text


Hi ,

Can anyone help me with this?

I’m trying to get the text from the notification window and need to compare text with actual text.

def object = Mobile.getText(findTestObject(‘Object Repository/app_1/Username or password is incorrect’),0)

i tried get Text but it didn’t worked.

All i’m trying is to validate, if i get the username or password incorrect popup, it should compare the alert text with expected test.

Thanks a lot!!!