UIATableCell renders child elements differently between iOS 7 and iOS 8


I am facing an issue in which an iOS application renders elements differently between iOS 8.0 and iOS 7.0

Before i end up doing runtime check on the version and apply different logic, i would like to check with the community is this something easily addressable?

Here is the issue…

I am automating an iOS application in iOS version 8.0 , I wanted to inspect the second TableCell value. As you see in the screenshot each elements are clearly presented as separate UIAStaticText elements.

When I tried to automate the same app in iOS 7.0 version device and while inspecting the same element, all three elements are concatenated as “Tinker, Solider, Tailer” in a single UIAStaticText element. See screenshot.

The following DropBox link has the Sample Project file that would demonstrate this issue.
"ListViewTest": https://www.dropbox.com/s/8isi2oz8o4fatcm/ListViewTest.rar?dl=0

  1. Build the xcode project and launch the application in iOS simulator 8.0 and 7.0 version.
  2. Copy the app file and pre-launch using Appium and Inspect the element shown in the image.

Ever faced this kind of issue? Any help is highly appreciated.

Potential solution: stop supporting iOS7. :stuck_out_tongue:

I was mostly joking. But on the serious side, active iOS users keep up with the OS updates. See this article from January: http://www.macrumors.com/2016/01/12/ios-9-is-now-installed-on-75-of-active-ios-devices/

As Christopher said if it’s possible for you to opt out for iOS 7 then stop supporting it.

If you have to provide support then,

  1. Identify which iOS version you are running on.
  2. Use different strategy based on the iOS version.
    It’s a tedious solution but works.

@pr4bh4sh and @Vignesh_Radhakrishna, you know what, DOM object is also different between iOS 8 and 9. so better to target IOS 9 because people always update their mobile OS.

And I thought only Android has issues, now iOS too, @Priyank_Shah what’s your approach in this situation?