Uploading image(profile pic)


I am not able to click on the gallery icon which occurs when I click on Upload Profile in my app using appium. I had tried even absolute xpath where it says ‘element not found’. Please let me know how to do this and further steps to upload image.


use the class name and resource id combination to write the xpath.
For ex,xpath=classname[@id=‘id value’]

Hi vani,

I had tried as you had said but no luck. Check below image for any help




From my experiences, I gave up with that kind of element.

I just applied a workaround by touching on element’s location. The problem comes if you test with another devices with different screen size.

Looking for a better solution…

Hi TuHuynh,

Do you say that even absolute xpath given below too doesn’t work. I had tried this way too but no luck.



No, I meant bounds [540, 1770]
I would use Touch action to touch on [550, 1780]

1 Like

Hey, thx bro :+1:
The above one worked for me

1 Like

Happy when hearing that but pay attention when changing the testing device. It doesn’t happen quietly but will.

Happy testing!


I think you should refer this for more options because there was an element with NAF=true but we don’t need to use Touch action.

1 Like


Thanks for getting back with more information. But unfortunately I had got stuck with one more issue where I cannot click on the folders in the gallery as shown in the image below.

I want to click on the 3rd folder where I want to select the pic out of the available pics(12). I had used x,y co-ordinates as shown below.

TouchAction Action2 = new TouchAction(driver).tap(530,1565);

Please suggest.