Android App Testing- Set text method does not type whole text in email and password fields

Code :

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 com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords 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

Mobile.startApplication(‘C:\Users\shital.tadas\Desktop\android-debug.apk’, true)

Mobile.waitForElementPresent(findTestObject(‘Object Repository/android.view.View14’), 40)

Mobile.setText(findTestObject(‘Object Repository/android.view.View14’), ‘auto@local.net’, 20)

Mobile.setText(findTestObject(‘Object Repository/android.view.View19’), ‘Rest@123’, 10)

Mobile.tap(findTestObject(‘Object Repository/android.widget.Button0’), 10)

Mobile.closeApplication()

… While recording also the text given in pop up does not enter on email and password fields.

It Type as aut@cal.net and password as 13. and now while running it again it type partial text … tried giving input from data sheet as well… it doesnot type full text

Was facing this issue earlier to 6.1.3, in 6.1.3 and in 6.1.4 also

Introduce Delay keyword in between two setText syntex then I hope it will resolve your problem

Mobile.delay(10)

Even after delay is given… facing same issue… it is partially entering the data in the fields.

Mobile.startApplication(‘C:\Users\shital.tadas\Desktop\android-debug.apk’, true)

Mobile.waitForElementPresent(findTestObject(‘Object Repository/android.view.View14’), 40)

Mobile.setText(findTestObject(‘Object Repository/android.view.View14’), ‘auto@local.net’, 20)

Mobile.delay(10)

Mobile.setText(findTestObject(‘Object Repository/android.view.View19’), ‘Rest@123’, 10)

Mobile.tap(findTestObject(‘Object Repository/android.widget.Button0’), 10)

Mobile.closeApplication()

Delay is not a problem because its not just password field but partial data entered in both email and password fields

Could you please create a variable and assign the value you want to type on set text for email and separate variable for password
uname = User1
password = Rest@321

Mobile.setText(findTestObject(‘Object Repository/android.view.View19’), password, 10)
Mobile.setText(findTestObject(‘Object Repository/android.view.View14’), uname, 10)

hope this will resolve ur prolem

Tried that as well but that didn’t resolve the Problem.

Problem was with my Phone Oppo . When run same script with Motorola, it worked fine. so there may be some driver issue

Hi @shitaltadas,

I’ve also found that sendKeys() is sometimes more reliable than setText(). Note that you’ll need to tap into any field you want to type first, so that the keyboard opens.

Here are some details about how to do that:

Hope this helps,

Chris