How To handle dynamic xpaths issue for ios native app’s automation testing with appium

Hi All,
I have to write test cases for Native iOS app which adds new elements on pull to refresh. I need to write test cases for those dynamic elements.
How I can find the elements in this case? What is the best way for finding element in this case? Also the elements which are always visible but because of top element’s xpath index will be changing. How to find elements for those elements?
Note: Element name, label and value will keep changing on inputs ,updates .As the elements are getting value from web service call and binding. Please suggest a workaround.
I am writing test cases in appium java client and IOSDriver.

best way - forget about xPath nightmare and add nice “accessibilityIdentifier” to any element needed in iOS code directly.

you can do it yourself or ask iOS dev for help.

Hi Aleksei
Thanks for response.I am new to appium .My app is hybrid cordova iOS app. I need to write test case for dynamic element.Please,Let me know what is the root of my problems? what do I need to do?

Show us your screen with problem element.

Hi Alesksel,
As you ask for screen short.This is an hybrid ios cordova app.Please reply asap.

This is first screen view

This is second screen for which i have write test case.
.

1 - “3 items” text you can’t see?
2 - add pagesource ( driver.getPageSource() )

Hi
Blue color icon on image thumbnail is hidden .It appears only when thumbnail is clicked and only then footer will also appears.How do we get invisible item on page
and make it clickable.