One lesser hectic method to retrieve the OTP from SMS.
There is an android app / website:
mysms.com, it gives us free SMS push service, where you can get your text messages directly on a website.
Pre requisites to use this method:
- You should have an android phone
- Phone should be connected to Internet, when script is running
- Phone should have an app “MySMS” installed
- User should have an account on mysms.com with that phone number
How it works?
Whenever any message comes in your inbox, it will push it to your web account in fraction of seconds and then using your automation scripts you can retrieve the message info from the webpage (which will have your OTP).
Setup one time, and use it for many times..
Advantages of using this method:
- Physical presence of your phone is not needed.
- You don’t need any extra appium script to automate your phone messaging app.
- You will get your OTP by hitting a simple Web URL.
- It will be easy to implement and fast for sure.
Limitations of this method:
- Its depends on Mobile network, if there is no cellular network, you won’t get any OTP.
- You need to have a dedicated android device /phone number in order to use it (this app is not free for iPhone devices).
I have tested this feature on my android phone and its working fine. There are other apps available in market which provide you same kind of SMS push services, you can pick any app.
Also, for those who want to automate the OTP for any mobile number outside India, they can use this website – http://www.receive-sms-online.info/
Looking forward to get some more efficient methods to resolve this problem. Please reply if anyone has any..
By – Vishal Singh, Software QA Lead