Appium Test Cases for In App Purchase

Hello all, I am new here. I am trying to write test cases using mocha and chai and a few other javascript libraries and frameworks. I have appium and I have an android and ios device. I have appium as a node module. I am trying to write test cases to test for in app purchase for both iOS and android device. I am not sure how to do it. Do I check for a browser popup for in app purchase? There are lots of tutorials on Java on browser or popup, but barely any resources online for javascript. Thank you.

Is this a native app? I am assuming its a browser based app from the way you describe.
What do you get when you press the purchase button? Have you had a look using the appium inspector, it tends to help a lot in finding what the app presents. Not done this on android, but the app stores have very different behaviors - so don’t expect any patterns.

Apple has a sandbox, android/Google store have special “test account” setup steps. I’m only now getting into the latter myself. Have you looked at this page:

A developer needs to add a “dummy” email address to the profile for apple for you - there are stackoverflow threads all about the problems not to fall foul of.


Hello Conrad, thank you so much for your help. so basically I am using appium with youi engine(displays the app as if it was on the actual device). I do not have a simulator or an actual device connected. I do have a sandbox account for testing in app purchases testing.

So basically I know you can’t really interact with appium with youi engine without it crashing often. The problem I am encountering right now is… when I have the app loaded… using appium and youi engine… the app loads and everything is good. Right when I am on a page where I want to make a purchase, the screen just loads and doesn’t show the purchasing screen.

For me , on android Native apps the sandbox or test cards do give a actual UI.

On apple devices, also a native app, there is no appstore UI presented for test accounts, appearing at all. If you log out of the apple store, on that device, then you will get an appstore login (for your test account) when the purchase occurs, but no other UI at all. Sorry, have not tested browser apps on mobile.