Page 1 of 1

'controlid' value - main difference between devices?

Posted: Wed Sep 16, 2015 12:13 am
by gilbar16
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

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

Posted: Wed Sep 16, 2015 8:28 am
by odklizec
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.

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

Posted: Wed Sep 16, 2015 8:52 pm
by gilbar16
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']

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

Posted: Fri Sep 18, 2015 1:34 pm
by Support Team
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)