Page 1 of 1

How can I catch event within mobile app

Posted: Mon Apr 18, 2016 2:23 am
by FelixK98
Hi Everyone,

I am testing iOS mobile app which is scans QR/Barcode and as result showing some screen.
Is it any possibility to mock up scan event using Ranorex?

Thanks,
Felix.

Re: How can I catch event within mobile app

Posted: Mon Apr 18, 2016 1:23 pm
by odklizec
Hi Felix,

I don't think you can catch an iOS event via Ranorex? But I could be wrong about this ;) Anyway, I think the easiest solution of your problem could be adding a WaitFor Exists/NotExists action right after clicking the button/element, which starts the scanning process (if there is such action performed during your test). Now the WaitFor action should wait for the appearance/disappearance of an element in automated mobile app GUI. For example, you can detect appearance of the element, in which should be displayed the results? Hope this helps?

Re: How can I catch event within mobile app

Posted: Tue Apr 19, 2016 12:22 am
by FelixK98
Hi odklizec,

Thanks for reply.
My problem, actually, that App make scan in sake to make user login or/and read some data that should be shown as result. In both situation scanner (which is extra hardware attached to iPod) sends data to the app.
So, I need somehow mimic this action. My app is a hybrid app build on top of scanner app.

Thanks,
Felix.

Re: How can I catch event within mobile app

Posted: Tue Apr 19, 2016 7:44 am
by odklizec
Hi Felix,

I'm not sure I understand how exactly do you start the scanning process? Is there a button/element in your iOS app that you need to touch to start the scanning process? If you start the process (manually) from the attached device, then I'm afraid, there is most probably nothing you can do via Ranorex (unless there is a .Net code/API to communicate to the attached device via .Net). Anyway, I still think you could use WaitFor Exists to wait for the appearance of an element in your iOS app. Eventually, you can wait for the change of an element content? Or you will have to ask the iOS app developers to add some kind of indicator to iOS GUI, which you can use as a validation element for WaitFor Exist action.

Re: How can I catch event within mobile app

Posted: Wed Apr 20, 2016 1:37 am
by FelixK98
Hi odklizec,

Thanks for suggestion. The app does not contain any button for scan, scanning done by using attached scanner with scan button. We need to look at device API and find what we can use to trigger scan simulation. But for the time being our dev team set extra field which can get value that barcode contains and it will trigger application action.

Thanks,
Felix.