Open mobile browser or calling api while running mobile app automation

Hello,
can Katalon support this scenario
i have an app with otp request,
also have an url to get otp code OR an api for calling get otp code
so can I open the app, request otp, then open the mobile browser (or calling api) to get code, then back to current session of app to input otp
thank you!
Tay

Hi @taynguyen,

Are you specifically getting your OTP from an email or API?

There is a lengthy discussion about how to get an OTP from a text notification in this thread:

There’s also a video here that might be helpful:

– Chris

yeah,
yes, i can get otp from api, once otp is generated it is also added on db too.
thank you so much, let me try then:stuck_out_tongue:

Hi @taynguyen,

You can mix in API calls to your mobile or web tests in Katalon. So at a high level, you could do the following:

  1. Create a Test Case that triggers an OTP in your project
  2. In the same project, create a new Web Service Request
  3. Fill in the info you would use to access the API - the URL, any parameters you would need, etc.
  4. In the Web Service Request, choose to add the request to an existing Test Case (choose the Test Case from above)

  1. You’ll see that a new line was added to your Test Case for the Web Service Request
  2. Add more testing steps to your Test Case that takes the result of the Web Service Request and fills in whatever mobile forms you have

Here are some docs on how to create an API call test in Katalon Studio:

And here are some docs on how to make the API calls manually:

Hope this helps,

Chris

Yeah, thank you,
Thank for your contribution too, :heart_eyes:
i got it, let me try then!

Hi Chris_Trevarthen,

Can you support me this scenario:
My app about capture face and driving license …, compares and put information…
I write test auto for this app, but in the screen “capture face”, after captured and press button complete, the app auto move to the result screen.
I want after step captured face before press button complete, can I call API with image be saved in the project instead of the captured image?

Many thanks!!!

Hi @VanVu,

To clarify, the app you’re testing is calling the API to upload the image directly - is that correct? You’re not uploading the image via a Katalon API test, is that correct as well?

In this case, you might have a few options to upload a specific image:

  1. Use a proxying tool, like Charles Proxy to rewrite the outgoing API call and replace the image with an existing one from your file system
  2. Build into the app a debug “switch” that pulls an image from the file system, and not the app’s camera
  3. Edit your test to overwrite the camera image file on the device before it sends it to the API (this is probably the most complicated, and I don’t know exactly how to do it at the moment, if it’s even possible).

Hope this helps,

Chris

Hi Chris,
Thank you for support to me, I will try it.
Could you support connect Genymotion into Katalon?

Many thanks!