How to write automated test cases independent of iOS device

For example, if i have 3 staticText fields on my screen, in case of iPad i am able to see all three at a time so for ipads i will be able to locate all the fields easily. But now in case of smaller devices like iPhones out of 3 suppose i am able to see only two fields and for the third one i need to scroll down a bit and in this case without scrolling down i wont be able to find the third text field.
So my question is how to handle such conditions, i am not looking forward to write independent test cases for different devices. I want to generalise this situation.
please do help.

Thanks You!

Write a helper method that looks for the field, then scrolls if it needs to. Then just call that for all 3 fields you’re looking for

Thank You @bennid !!!

Basically I am using java to write my framework. I tried to handle this situation using TRY-CATCH, in which in TRY i try to find the element , if the element is present then well and good but if not then the exception is thrown and then the CATCH block first scrolls and then again tries to find the element. and in FINALLY I am writing the action to be performed on the found element.

I wanted to know if there is any another efficient pre-constructed methods to handle this situation.