Entering the Text in the field which has placeholder

Mobile Testing, Android App Testing.
lalithabakthava
Posts: 2
Joined: Fri Jul 19, 2019 4:25 pm

Entering the Text in the field which has placeholder

Post by lalithabakthava » Thu Jul 25, 2019 5:21 pm

Hi all,

I am trying to automate an android app. And, when I try to enter the text in the textbox, it overrides the placeholder text, I would like to clear the text before I enter the value in the textbox.

I tried, setvalue as null before I enter the value in the textbox, it didnt work, And I also tried MobileKeyPress - Del and MobileKeyPress - Enter. But still I am finding difficulty in entering the text.

If you could see the picture the Login button is not enabled as the text is entered without clearing the placeholder. Can anyone suggest me a correct method to enter the text in the textbox. I just want to clear the content and enter the text.

Many thanks in advance.
Attachments
MobileApp.PNG
MobileApp.PNG (259.28 KiB) Viewed 58 times
Actions1.PNG
Actions1.PNG (25.51 KiB) Viewed 59 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11931
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Entering the Text in the field which has placeholder

Post by Support Team » Fri Jul 26, 2019 9:02 pm

Hi lalithabakthava,

Typical behavior of these fields is that it clears the placeholder/hint text when you focus the field via a touch action. Before doing the set value, try doing a touch action on it first. Touching any input field before changing its value is a standard best practice to ensure all event listeners are being fired and to better simulate a real end user.
1.png
1.png (6.13 KiB) Viewed 43 times

I hope this helps!

Regards,
Ned
.
Image