(Root cause: Object Object Repository/test/mytext not found)

Hi Mandy,

Thanks for providing all of that info.

It has been my experience that when I receive an error saying that an object can’t be found, it really cannot be found on the screen, sometimes because it’s hidden by another view or I haven’t given it enough time to show up.

From the initial glance, it looks like your test is set up correctly. One thing you might want to try doing is to put a delay after you tap the Login button:

Mobile.delay(5)

Just to make sure that you’re not looking for the text before it shows on the screen. You can also change the last parameter (currently set to 0) on your Mobile function calls to be a number of seconds to wait.

A way to double check that the element actual is showing on the screen is to add some logging to print out the contents of the screen right before you do your getText() call. You should be able to do that by putting the following import statements at the top of your test case:

import com.kms.katalon.core.logging.KeywordLoggerimport com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactoryimport io.appium.java_client.AppiumDriver

Then in the code for your test, add the following right before the getText() call:

AppiumDriver<?> driver = MobileDriverFactory.getDriver()
KeywordLogger log = new KeywordLogger()
log.logInfo(driver.getPageSource())

When the test runs, you should see an entry in the Log Viewer for “Statement - log.logInfo(driver.getPageSource())” that shows the start of the XML for the screen. If you tap on it, you’ll see all of the XML for the screen on the right-hand pane. If you could copy and share that, I can help troubleshoot why the getText() isn’t working. (I recommend putting it into a text editor first to remove any sensitive data, like package names, etc.)

Hope this helps,

Chris