Scripts done for iPad won't work for iPhone

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

Scripts done for iPad won't work for iPhone

Post by gilbar16 » Mon Nov 09, 2015 8:04 pm

I just found out last Friday that the scripts I have that runs well in the iPad Air 2 will not work on iPhone 6.
The main reason is the way the Dropdowns or Pickers are rendered on these two devices.
In the iPad, the dropdown list looks like a regular dropdown list you see in Windows or Web apps.
In the iPhone, the dropdown list looks more like one of those DatePickers with a Done button. User has to tap the Done button after selecting an item from the list.

Is there any work-around to this so that you can use the same scripts for both iPads and iPhones?

Note: I understand that the same dropdown controls are rendered differently in Android devices. They show up as Radio buttons in a Samsung Galaxy Note 4.

Thanks.
Gilbert

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

Re: Scripts done for iPad won't work for iPhone

Post by tvu » Mon Nov 09, 2015 8:20 pm

I think there are a few things you can easily do to deal with this:
1. Put an Optional action to touch the Done button after selecting from the list. That way, it would press it on the iPhone and skip it on the iPad
2. Have a parameter that lets you know if you are testing on an iPad or an iPhone. Have a custom code action to do an "if iPhone then press button" action.
3. If you don't want to pass in a parameter then you can do a custom code action that checks to see if the button exists. If it does then press the button else do nothing.

Hope that helps.

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

Re: Scripts done for iPad won't work for iPhone

Post by gilbar16 » Mon Nov 09, 2015 9:45 pm

Thanks for the suggestions, tvu.

Most likely, we would have to create User-defined Functions to handle this.

The main issue right now with Ranorex 5.4.3 is that it Records and Play properly in clicking the Done button but, the field, for example State, does not get updated with the item/State you selected.
You click on the field or down arrow, you select an item from the list, you click on Done button, the dropdown list disappears but the field is not updated as if you did not select any item when you from watching the execution that Ranorex did select the target item from the list.