iPhone vs iPad

Mobile Testing, Android App Testing.
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

iPhone vs iPad

Post by tvu » Thu Oct 15, 2015 10:29 pm

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.


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

Re: iPhone vs iPad

Post by Support Team » Mon Oct 19, 2015 2:58 pm

Hi tvu,

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

Markus (S)
You do not have the required permissions to view the files attached to this post.

Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: iPhone vs iPad

Post by tvu » Mon Oct 19, 2015 6:34 pm

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.