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

**URL:** <https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [May 8, 2019, 8:39am UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815 "2019-05-08T08:39:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shitaltadas](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shitaltadas](https://forum.katalon.com/u/shitaltadas)\
**Post date:** [May 8, 2019, 8:39am UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/1 "2019-05-08T08:39:39Z")

</div>

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](mailto: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

---

<div class="post-metadata">

**Author:** ![satish1607](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/satish1607/32/16103_2.png) [@satish1607](https://forum.katalon.com/u/satish1607)\
**Post date:** [May 8, 2019, 2:20pm UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/2 "2019-05-08T14:20:22Z")

</div>

> [@shitaltadas](#):
>
> obile.setText(findTestObject(‘Object Repository/android.view.View14’), ‘auto@local.net’, 20)
> 
> Mobile.setText(fin

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

Mobile.delay(10)

---

<div class="post-metadata">

**Author:** ![shitaltadas](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shitaltadas](https://forum.katalon.com/u/shitaltadas)\
**Post date:** [May 9, 2019, 12:54pm UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/3 "2019-05-09T12:54:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![satish1607](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/satish1607/32/16103_2.png) [@satish1607](https://forum.katalon.com/u/satish1607)\
**Post date:** [May 13, 2019, 3:03pm UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/6 "2019-05-13T15:03:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shitaltadas](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@shitaltadas](https://forum.katalon.com/u/shitaltadas)\
**Post date:** [May 17, 2019, 1:22pm UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/7 "2019-05-17T13:22:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Chris\_Trevarthen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/chris_trevarthen/32/358_2.png) [@Chris\_Trevarthen](https://forum.katalon.com/u/Chris_Trevarthen)\
**Post date:** [May 17, 2019, 5:06pm UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/8 "2019-05-17T17:06:41Z")

</div>

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:

> [@Slow execution on setText](http://forum.katalon.com/t/slow-execution-on-settext/13389/2):
>
> Hi Ashish, Alternatively to setText, you can try Katalon’s sendKeys function: Using Katalon’s sendKeys function: Add this import to your test file: import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile Then send the keys to the textField Test Object: Mobile.sendKeys(textField, "My Value"); Using Appium’s sendKeys function: If that doesn’t work, you can try using Appium’s sendKeys function directly: Add these import statements to the top of your test file: import i…

Hope this helps,

Chris

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:48am UTC](https://forum.katalon.com/t/android-app-testing-set-text-method-does-not-type-whole-text-in-email-and-password-fields/24815/9 "2022-08-08T07:48:58Z")

</div>

Archived on August 8, 2022, 7:48am UTC


