How to automate the read OTP test case

how to recognize Read OTP in android app by using appium studio

Please check the response.


Basically you have to test record the whole case.
i.e Open the Sms app , read the otp code then past the otp code in your app.

There is not other api which Appium Studio provides for this.

in this case appium studio how identify all inbox messages

Well when you do automattion and u just have done some action on your app , the notification will be the latest one. You will have to open the SMS app and check which only of the latest u “Your OTP is :” and then extract the code.

You have other option of startActivity but that way you cannot use test recording.

Please see https://stackoverflow.com/questions/31982131/how-to-test-otp-verification-with-appium for more info. There is no straight forward way/API which Appium Studio provides to read OTP .