'controlid' value - main difference between devices?

Mobile Testing, Android App Testing.
gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

'controlid' value - main difference between devices?

Post by gilbar16 » Wed Sep 16, 2015 12:13 am

Hello,

If I record a script on iPhone 6, the script will run successfully on iPhone 6.
As soon as I switch to iPhone 5S, the script will not run. It will only run when I unchecked the reference(s) to the element 'controlid'.

How do handle this situation?
Is the controlid element the one to change or is there something else?

I did a similar test on two different Android devices and the results were the same.

Thanks.
Gilbert

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

Re: 'controlid' value - main difference between devices?

Post by odklizec » Wed Sep 16, 2015 8:28 am

Hi Gilbert,

There are missing some critical details in your post. Please answer these questions..

Your Ranorex version?
iOS version number (is it the same on both devices?)?
Please post the failing xpath.
Have you compared the failing xpath on both devices (via Ranorex Spy).
Please post a Ranorex snapshot of problematic element both from iPhone 5s and iPhone 6.
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

gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

Re: 'controlid' value - main difference between devices?

Post by gilbar16 » Wed Sep 16, 2015 8:52 pm

Hi Pavel,

Sorry, for the missing information.
Ranorex Version is 5.4.1.25490
The rest of the info I have to check since I am not using real devices or emulators.
We are using the free version of Keynote MITE which is the closing thing to using real devices as advertised. It uses the DeviceAnywhere Cloud where over 2,200 devices are available to choose from.
So the way I connected Ranorex to the devices is selecting Desktop then adding Keynote MITE app. From there, we can interact with the device as if you are using a real device.
But we noticed that the 'controlid' for one device is not the same when we switch to another device. By disabling or removing the 'controlid' element from the repository or the RanoreXpath, the script will run but much slower.
Maybe with real devices, this 'controlid' element does not change but I don't have real devices to try it now.
I will check again with Genymotion emulator if this 'controlid' changes or not and will let you know.

Thanks.
Gilbert

Below screenshots showing the difference between iPhone 6 and iPhone 5S controlid elements as recorded by Ranorex from the Keynote MITE desktop application/simulator. Screenshots not copied here so please see the attachment.


‘controlid’ element recorded by Ranorex using Keynote MITE simulator tool

From iPhone 6:


/form[@title~'^Mobile\ Internet\ Testing\ E']/element[@controlid='59648']/?/?/element[@controlid='198599800']//form[@title='MITEC']/dom[@domain='memberuat1.molinahealthcare.com']//input[#'btnLogin']




From iPhone 5s:


/form[@title~'^Mobile\ Internet\ Testing\ E']/element[@controlid='59648']/?/?/element[@controlid='204443552']//form[@title='MITEC']/dom[@domain='memberuat1.molinahealthcare.com']//input[#'btnLogin']
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: 'controlid' value - main difference between devices?

Post by Support Team » Fri Sep 18, 2015 1:34 pm

Hi Gilbert,

Thank you for providing the additional information. As you already observed, the control id is changing on your devices. In order to overcome this issue you would need to find a different attribute for identification.
Therefore, I'd suggest comparing a snapshot of both devices to see if there are additional attributes, which have the same value.
Please find a detailed description how to create a Ranorex Snapshot by following this link to our user guide.

If you upload these snapshots here, we can also help you checking the different attributes.

Regards,
Markus (S)