How can I catch event within mobile app

Mobile Testing, Android App Testing.
User avatar
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

How can I catch event within mobile app

Post by FelixK98 » Mon Apr 18, 2016 2:23 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How can I catch event within mobile app

Post by odklizec » Mon Apr 18, 2016 1:23 pm

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

Re: How can I catch event within mobile app

Post by FelixK98 » Tue Apr 19, 2016 12:22 am

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How can I catch event within mobile app

Post by odklizec » Tue Apr 19, 2016 7:44 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

Re: How can I catch event within mobile app

Post by FelixK98 » Wed Apr 20, 2016 1:37 am

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.