Unable to scroll down till the end of the screen in native ios app using appium

Hi All,

I’m facing an issue in scrolling down till the end of the screen. As this page is dashboard screen and which is of “UIACollection”

I had tried scroolTo, ScroolTOExact methods but it was not working and finally tried with IOSAutomation by using xcode xpath

Now I’m able to scroll but not totally (means not till end of the screen). I have a string at the bottom of the screen where I need to do assertion on it but I’m unable to do due to this issue

IOSAutomation xpath code

driver.findElement(MobileBy.IosUIAutomation(“target.frontMostApp().mainWindow().scrollViews()[0].collectionViews()[0].scrollToVisible();”));

Result of that code

Now I want to do assertion on the “Last 14 days” string which is present on the last 2 tiles in which the page is not getting scrolled totally upto the bottom of the screen

I’m able to get the xpath of that string “Last 14 days”. But the only issue here is the screen is not totally scrolling down to the bottom of the page.

For the remaining tiles which contains that string, I’m able to do assert for that.

As I need to test in many different devices where x, y coordinates doesn’t work in this case.

Please help me in resolving this issue.

Thanks in advance