Android difficult scenario: 'recover password' functionality

Mobile Testing, Android App Testing.
martinhesdahl
Posts: 2
Joined: Thu Apr 21, 2016 3:09 pm

Android difficult scenario: 'recover password' functionality

Post by martinhesdahl » Thu Apr 21, 2016 3:39 pm

Hello guys,

I'm building a regression test for an Android app.

This is the scenario which I would like to get automated with Ranorex.
1. Press 'forgotten your password'
2. Fill in your mailadres to receive a code
3. Retrieve the code from your mail
4. Insert the code
5. Go to the next page with the text: "de herstelcode is geldig en verloopt op..." (this message dissapears in like 2 seconds) and is not recognized as an element
6. Fill in a new password

Especially steps 3-5 make this a very hard scenario (atleast to me) to automate. I would also be content if the tester would have to recover the code himself from his mail and fill it in. Perhaps Ranorex could then continue if it sees (maybe use validate?) the text "de herstelcode is geldig en verloopt op..."

Could someone be so kind to help me out. If it's very hard to automate also let me know so I try to move around this in some way.
Attachments
Ranorex element not recognised.png
Ranorex element not recognised.png (148.79 KiB) Viewed 770 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Android difficult scenario: 'recover password' functionality

Post by odklizec » Fri Apr 22, 2016 2:36 pm

Hi,

To be able to create and replay steps outside the instrumented Android application, you need to follow these steps :
http://www.ranorex.com/support/user-gui ... -apps.html

Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

arb
Posts: 2
Joined: Thu Apr 21, 2016 10:34 am

Re: Android difficult scenario: 'recover password' functionality

Post by arb » Wed May 04, 2016 8:56 am

I would suggest to write some user code to fetch the emails yourself from the server using IMAP.
A simple example: https://code.msdn.microsoft.com/windows ... T-b249d2e6
Just use a spezific mail account just for this test and you are able to check the server for a new mail repetedly.
Since the account is not used for anything else you could just assume, that it is the the correct mail or validate it using the header for example. Fetch the mail, parse it to obtain the code and enter it in your application.

martinhesdahl
Posts: 2
Joined: Thu Apr 21, 2016 3:09 pm

Re: Android difficult scenario: 'recover password' functionality

Post by martinhesdahl » Fri May 06, 2016 1:08 pm

Thanks a lot guys for your help. I'll ask one of the developers here to write some user code to fetch the emails myself, using IMAP. Really appreciate the responses!