Entering the Text in the field which has placeholder

Mobile Testing, Android App Testing.
lalithabakthava
Posts: 3
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
Capture.PNG
Capture.PNG (394.11 KiB) Viewed 84 times
Capture.PNG
Capture.PNG (394.11 KiB) Viewed 84 times
Last edited by lalithabakthava on Tue Aug 20, 2019 12:38 pm, edited 9 times in total.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11978
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 135 times

I hope this helps!

Regards,
Ned
.
Image

lalithabakthava
Posts: 3
Joined: Fri Jul 19, 2019 4:25 pm

Re: Entering the Text in the field which has placeholder

Post by lalithabakthava » Tue Aug 20, 2019 11:18 am

Hi

Thanks for the response, I tried it with touch but still the placeholder is not clearing

Any help please?
Capture.PNG
Capture.PNG (394.11 KiB) Viewed 89 times
Capture1.PNG
Capture1.PNG (36.93 KiB) Viewed 89 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11978
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 » Tue Aug 20, 2019 8:52 pm

Hmm, these fields may be a bit trickier and use event listeners such as keyup/keydown which can be harder to trigger on mobile. Is this a hybrid/web application by chance? If so, there is a way to execute JavaScript to force trigger event listeners that are not being fired with the standard Ranorex actions.

If you are able to provide your application, I will be happy to troubleshoot this locally in our controlled environments and see if I can find a solution to this issue. You can contact us directly if you wish to troubleshoot this directly with us.

Regards,
Ned
.
Image