I am automating login page in an Android app, right next to username text box there is a country region option to choose before login.

What am trying to do: 

**Trying to tap on country flag element** and then it will open a page to choose which country to login.

What I did: 

In Appium by selecting the flag element, username or email address section is getting selected. and hence element id for username is getting displayed and so, I selected flag section using coordinates but what happens is works for me but the problem is on different display size android devices it cant find that element in that same coordinates.

**Code:**
`TouchAction(driver).tap(None, 651, 796, 1).perform()`

**what should I do in this case? any thoughts?**

[![enter image description here](https://i.stack.imgur.com/21uhR.png)](https://i.stack.imgur.com/21uhR.png)