Hi, I’m hoping that perhaps someone could guide me in the direction of overcoming my current issue. Still relatively new to automated testing, I’m trying to get a simple log in, log out script working. However, when running the test case in Katalon, Appium is not able to recognize an element/object and enter text into it appropriately. When recording it is able to do so, but not when ran in a test. Is there a suggestible method I could use?

Captured Object Name: android.widget.EditText1 - Password

Object Properties:

class android.widget.EditText

instance 1

text Password

checkable false

checked false

clickable true

enabled true

focusable true

focused false

scrollable false

long-clickable true

password true

selected false

x 81

y 449

width 917

height 118

Hi Kyle, can you share your test code as well?



import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint

import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory

import as MobileBuiltInKeywords

import as Mobile

import com.kms.katalon.core.model.FailureHandling as FailureHandling

import com.kms.katalon.core.testcase.TestCase as TestCase

import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory

import com.kms.katalon.core.testdata.TestData as TestData

import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory

import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository

import com.kms.katalon.core.testobject.TestObject as TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

import org.openqa.selenium.Keys as Keys

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

Mobile.startApplication(‘Downloads\\app.apk’, false)

Mobile.tap(findTestObject(‘android.widget.Button0 - ALREADY HAVE AN ACCOUNT’), 40)

Mobile.setText(findTestObject(‘android.widget.EditText0 - Email’), ‘’, 40)

Mobile.setText(findTestObject(‘android.widget.EditText0 - Password’), ‘password’, 0)

Mobile.tap(findTestObject(‘android.widget.ImageView7’), 40)

Mobile.tap(findTestObject(‘android.widget.Switch0 - OFF’), 40)

Mobile.tap(findTestObject(‘android.widget.Button3 - LOGIN’), 40)

Mobile.tap(findTestObject('android.widget.Button0 - '), 40)

Mobile.tap(findTestObject(‘android.widget.TextView12 - Logout’), 40)


I’ve also tried using Mobile.tap at location to get the cursor to appear in the Password field and then sending SendKeys, but that didn’t work either. Coincidentally enough, recently my test did go through at the part that it keeps failing at, however, it then got stuck on the Login button.

Test Cases/LILO FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Failed to set text into element (Root cause: Object Object Repository/android.widget.EditText1 - Password not found)

at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)





at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)


at$setText$ Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(





at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(

at com.kms.katalon.core.main.TestCaseExecutor.runScript(

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(

at com.kms.katalon.core.main.TestCaseExecutor.execute(

at com.kms.katalon.core.main.TestCaseMain.runTestCase(

at com.kms.katalon.core.main.TestCaseMain.runTestCase(

at com.kms.katalon.core.main.TestCaseMain$runTestCase$ Source)

at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(




at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(



at groovy.ui.GroovyMain.processOnce(


at groovy.ui.GroovyMain.process(

at groovy.ui.GroovyMain.processArgs(

at groovy.ui.GroovyMain.main(

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(

at sun.reflect.DelegatingMethodAccessorImpl.invoke(

at java.lang.reflect.Method.invoke(




Test Cases/

And this is a copy of the error text I receive when this particular step fails in the test case.

Failed to set text into element (Root cause: Object Object Repository/android.widget.EditText1 - Password not found)

Please share the definition of the Test Object ‘android.widget.EditText0 - Password’

What do you mean by the definition?

I mean the screenshot of the Test Object like this:

スクリーンショット 2018-11-19 23.34.18.png

Here you are. The strange thing is all of the commands go through fine when Recording and saving the test case. However, when I go to run the test case it can’t get past entering the password. It can’t seem to find the element.


Mobile.setText(findTestObject('android.widget.EditText0 - Email'),     '', 40)
Mobile.setText(findTestObject('android.widget.EditText0 - Password'),    'password', 0)

You set the timeout for ‘android.widget.EditText0 - Password’ to be 0. Any reason?

Please try setting it to be 40.

Hi Kyle,

Although it can be flaky at times, I’ve don’t often see Katalon lying about things on the screen. I wonder if this a case where your keyboard is covering the password field? If it doesn’t appear to be the case, we’d need to know a bit more about what Katalon/Appium think is on your screen at the time.

Could you log out the XML contents of the screen and share them (strip out anything proprietary/confidential first)? 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.KeywordLogger
import io.appium.java_client.AppiumDriver

Then in the code for your test, add the following right before finding the password field:

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

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 scrolling isn’t working. (I recommend putting it into a text editor first to remove any sensitive data, like package names, etc.)