Page 1 of 1

iPhone vs iPad

Posted: Thu Oct 15, 2015 10:29 pm
by tvu
Is there an attribute I can check to determine if I am using an iPhone or an iPad?

I have an issue where Ranorex isn't able to reliably set the text value of a search field. The support team is already looking into it. As a workaround, I am using the mobile keyboard to type in the search field. The Xpaths for the shift, ABC, 123 and #+= buttons are different when you are using an iPhone vs an iPad.

I have separate repository items for these buttons and need to determine which one to use when I am typing. I am using the iOS Simulator to run regression on a variety of device / iOS combinations.

I can think of two ways to determine this:
1. Pass in a global variable
2. Look at the ClientRectangle attribute to determine the screen size

But, I am hoping there is an API in place already or a more definitive attribute to check.

Thanks!

Re: iPhone vs iPad

Posted: Mon Oct 19, 2015 2:58 pm
by Support Team
Hi tvu,

Unfortunately it is not possible to determine the device type via Ranorex.
The following attributes can be used to identify your device.
Mobile_Attributes.png
I’m afraid you need to use one of your mentioned approaches.
Thank you for your understanding.

Regards,
Markus (S)

Re: iPhone vs iPad

Posted: Mon Oct 19, 2015 6:34 pm
by tvu
Thanks Markus,

I ended up counting the special keys on the keyboard to determine the difference between the iPhone vs iPad. I realize that the iPhone 6 Plus has a bigger pixel dimensions than the older iPads.