Page 1 of 1

Get background text values

Posted: Thu Jan 30, 2014 3:43 pm
by nusu
Hi,

Can you tell me how to get background text values like “Please enter password” while login (or something similar)
Environment used:
- Physical device: Android Nexus 4
- Operating system: Windows 7 SP1
- Ranorex version: 4.1.4.16685

Thank you.

Re: Get background text values

Posted: Mon Feb 03, 2014 2:43 pm
by mebner
Hi Nusu,

Could you please explain in detail what you are trying to do?
What do you mean with: get background text values like "Please enter password"?
Do you want to validate if the specific text is shown?

Regards,
Markus

Re: Get background text values

Posted: Mon Feb 17, 2014 12:02 pm
by nusu
Hi Markus,

Yes, I want to validate if the specific text is shown.
The thing is that this is a background text in an input field (for password) and I can’t validate it. Validation can be done for characters that are typed in the input field only, and anyway that would led to the above background text to be unavailable. (Moreover, this being a password field, the typed characters will be transformed in asterisk.)

Best regards,
Nic

Re: Get background text values

Posted: Mon Feb 24, 2014 5:45 pm
by Support Team
Hi Nic,

Can you please post a Ranorex snapshot file? This will help to analyze the issue in more detail.
Thank you!

Regards,
Bernhard

Re: Get background text values

Posted: Tue Mar 04, 2014 4:49 pm
by nusu
Hi Bernhard,

Due to company's rules the only thing that I can post is the Track line of the affected input; it is similar to:
"/mobileapp[@title='testpapp']/form[@title='LoginActivity']//text"

As you can see in attachments, there's nothing in Ranorex Spy - Overview/Detail section that I can relate to (like Text, Caption)



Best regards,
Nic

Re: Get background text values

Posted: Wed Mar 05, 2014 4:51 pm
by Support Team
Hi nusu,

You can, for example use a "Validate" (ContainsImage) action in order to check if the text is available in the text box.
You can use the "Validate" button in the recorder in order to create a "ContainsImage" action.
Please let me know if this doesn't work.
Please take a look at the following site on our website: http://www.ranorex.com/support/user-gui ... arted.html

Regards,
Bernhard

Re: Get background text values

Posted: Wed Mar 05, 2014 5:51 pm
by nusu
Hi Bernhard,

Thank you for the quick reply. I know that such a validation would work as I used it before (used it in order to test that the stored image found in some section/page is different from the actual one found in a different section/page; this approach is OK-and it works- to be used in that context ).
But, in this case, I stick to the same page, the login page, therefore the first page(I don’t go to a different page, do some modifications that would affect the first page and then return to the first one to check that the stored image wasn't modified meantime, and I’m not in a scenario were I store the existing image, move to a different page and then compare the images).
The thing is that besides this “Enter password” verification I also have to test the number of wrong password retries; so, it would be a validation against smth. similar to “Wrong password. Number of retries <counter>”, where <counter> would be decremented with every wrong login attempt.
Using an approach like validating "ContainsImage" action would mean to validate the image against itself, and that is not the intended purpose; that’s why I was searching for a validation against a “Match Value”.


Best regards,
Nic

Re: Get background text values

Posted: Fri Mar 07, 2014 4:09 pm
by Support Team
Hi Nic,

Unfortunately it is hard to analyze the issue without access to our application or at least to a Ranorex Snapshot file.
I know that your company rules don't allow to post the *.apk in the forum, but would it be possible to send it to [email protected]?
This would help to analyze the issue in more detail.

Regards,
Bernhard

Re: Get background text values

Posted: Tue Mar 11, 2014 2:19 pm
by nusu
Hi Bernhard,

Unfortunately it is a security issue and we need to keep our privacy but, we nevertheless need at least a guideline containing some rules or tips for our Developments; maybe you can provide us with a guideline how our devs should change the app so it is possible to read this elements. There should be some general guideline rules that the developers should follow in order the app’s elements to be readable for this particular case (“Login”). For example a general construction of a Table with cells that contain information.
Thank you.

Best regards,
Nic

Re: Get background text values

Posted: Mon Mar 17, 2014 3:47 pm
by Support Team
Hi Nic,

You can, for example try to use the R.id to make the value visible for Ranorex. A description how to set the RID can be found using the following website: Understanding R.java
I hope this works for you.

Regards,
Bernhard