Hi,
I am trying to automate the testing of an android application.
I recorded the steps which are:
1. touch username field
2. set field's value
3. touch password field
4. set its value
5. tap login button.
When I play the recording, it performs all the steps, but it doesn't login, and the message i get (from the app) is "Please fill username and password"... which is the message set to appear when the fields are empty.
How can I solve this problem.
fields appear to be empty, although they are not
-
- Posts: 8
- Joined: Tue Dec 29, 2015 4:27 pm
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: fields appear to be empty, although they are not
If you play steps 1-4 and look at the Android device, has the test actually filled in values for username and password?Essramasoud wrote:..1. touch username field
2. set field's value
3. touch password field
4. set its value
5. tap login button...
Re: fields appear to be empty, although they are not
SetValue should be used as a very last resort.
It does not fire any events, it just sets the value of a property.
For many user controls, especially text entry fields, this means that the software doesn't realize anything has been changed, because developers do not account for a means of entering text that a real user wouldn't be able to do.
Have you tried using Key Sequence actions? (I don't test on mobile yet, so I don't know if it does.)
It does not fire any events, it just sets the value of a property.
For many user controls, especially text entry fields, this means that the software doesn't realize anything has been changed, because developers do not account for a means of entering text that a real user wouldn't be able to do.
Have you tried using Key Sequence actions? (I don't test on mobile yet, so I don't know if it does.)
Shortcuts usually aren't...
-
- Posts: 8
- Joined: Tue Dec 29, 2015 4:27 pm
Re: fields appear to be empty, although they are not
Yes, the values get filled in.Fergal wrote:If you play steps 1-4 and look at the Android device, has the test actually filled in values for username and password?
-
- Posts: 8
- Joined: Tue Dec 29, 2015 4:27 pm
Re: fields appear to be empty, although they are not
krstcs wrote:SetValue should be used as a very last resort.
It does not fire any events, it just sets the value of a property.
For many user controls, especially text entry fields, this means that the software doesn't realize anything has been changed, because developers do not account for a means of entering text that a real user wouldn't be able to do.
Have you tried using Key Sequence actions? (I don't test on mobile yet, so I don't know if it does.)
Yes, the problem is just as you described, but the thing is that there is no "Key Sequence" action for the mobile recording.
I don't know if there is a workaround for this, is there?
Thanks,
-
- Posts: 65
- Joined: Wed Sep 24, 2014 7:47 am
- Location: Israel
Re: fields appear to be empty, although they are not
You can probably use it programatically
-
- Posts: 8
- Joined: Tue Dec 29, 2015 4:27 pm
Re: fields appear to be empty, although they are not
I couldn't the action "Key sequence" is not supported neither in user code nor recording.zivshapirawork wrote:You can probably use it programatically
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: fields appear to be empty, although they are not
If you then complete step 5 ("5. tap login button...") manually, do the values get submitted?Essramasoud wrote:Yes, the values get filled in.Fergal wrote:If you play steps 1-4 and look at the Android device, has the test actually filled in values for username and password?
Re: fields appear to be empty, although they are not
We also ran into this before where we couldn't set the value to a text field. This was an issue for us on Ranorex 5.4.3, but has been fixed in Ranorex 5.4.4. We wrote some custom code utilizing the PressKeys() method to type the value with the mobile device's keyboard.