Cannot Set Text on field


On mobile there is a field for activation, the filed is : +357 xxxxxxxxxxx
xxxxxx is the mobile number.
Field details: android.widget.EditText1 - +357
I cannot set text on this field. when I record my test case i don’t have any error but when i am doing the action on this field the mobile number is not written.
Can some help me?

Also when I tried to run my scenario I had the following error. Thank you

04-11-2019 11:34:25 AM Test Cases/MFS Activation 1

Elapsed time: 58.392s

Test Cases/MFS Activation 1 FAILED.
com.kms.katalon.core.exception.StepFailedException: Unable to set text ‘10000001’ of object ‘Object Repository/android.widget.EditText1 - 357’
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:48)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.setText(SetTextKeyword.groovy:65)
at com.kms.katalon.core.webui.keyword.builtin.SetTextKeyword.execute(SetTextKeyword.groovy:37)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.setText(WebUiBuiltInKeywords.groovy:950)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$ Source)
at MFS Activation Activation 1:21)
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)


Hi Dimitrios,

If it is not working on SetText try using Sendkeys

Mobile.sendKeys(findTestObject("Your_object"), "Your input")

Hope that helps. . . .:smiley:


Hello Arnel,
Thanks for your reply. I tried your solution but it didn’t work. The only difference is that the step now is completed succsfully but the data didn’t enter on the application in order to continue.
Thank you


Hi @dimitrios.d,

Sometimes you need to tap the text input field to activate the keyboard. Can you try:

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

int timeout = 10
def inputField = findTestObject('Object Repository/android.widget.EditText1 - 357')
Mobile.tap(inputField, timeout)
Mobile.sendKeys(inputField, '10000001')

Hope this helps,



Hello, the same behavior. The step completed successfully but didn’t enter the text on the field.
Any other ideas?


Hi @dimitrios.d,

I’ve sometimes seen this when a custom input field is used. If possible, could you please share a screenshot of the screen right before you’re trying to enter the text? Could you also share the properties of the Test Object in the Object Repository that you’re trying to enter text into?




Hello Chris,
I found a solution, i search from internet and i found the commands to enter the text using the keyboard.
Thaank a lot for your time.


Hi @dimitrios.d,

Glad you got it working! Could you please share your solution so that other people who encounter this issue can see it?




I find a solution fro this issues. I run the commands to use the kyebord.
please see below my solution
import as MobileDriverFactory
import as AndroidDriver
import as AndroidKeyCode

Mobile.tap(findTestObject(‘mobile activation’), 0)

AndroidDriver<?> driver = MobileDriverFactory.getDriver()









Unable to capture objects : Web Driver Exception

I have the same problem but this script is not working on my side. Any solution?

Thank You Sir


Hi, I am new in katalon, I have tried this solution but it’s not working.

Did you add/set anything outside the script?

Thank You


find below what i have add

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.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
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.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import as MobileDriverFactory
import as AndroidDriver
import as AndroidKeyCode


Hello sir,

Here is the screenshot when I applied your solution

the pressKeyCode does not identified

Thank You,


Hi @heavenmojica,

The Groovy editor doesn’t recognize this method but it’s OK if you run the test.



Hi Sir @duyluong

I tried to run with the underlined pressKeyCode and it’s working now, it types the 101 value but why the pressKeyCode underlined?


Hi @heavenmojica,

It’s good that you recognized the underlined code as a potential problem!

pressKeyCode is underlined because the editor can’t find a direct reference to the function. I’m guessing it’s because of the way that the AndroidDriver class and its underlying libraries are imported. It’s nothing to be concerned about in this case, but definitely something to keep in mind when writing code in the future.

Hope this helps,



Thank You sir @Chris_Trevarthen , it helps me a lot


Thanks this helped me lots trying to enter a PIN through the Android keyboard.


Tried different methods to enter text into an object but still its taking more than an hour even its failing to enter the text. I had initialized the appium driver also but couldn’t find any solution. Please give me any other chances of sending values for mobile apps.

Thanks n Regards


Yeah i have tried this too. Still the same issue occurring