IOS-Customized UIImage is not visible through Appium inspector

Hi Everyone,

I am automating an IOS native application,
In that there is a icon which is a customized image and wrapped inside a button but when i inspect through appium inspector icon not shown in appium inspector.
Any solution for this issue or still an issue?

Please let me know

Thanks,
-Mani

may be you can validate the UIAButton’s value attribute for image’s path. Just a suggestion.

Thanks for suggestion @hemche

UIAButton itself not shown in inspector…those data i provided was got from development team.

Can you provide screenshot of the inspector showing the page’s hierarchy?

here i am trying to inspect green icon

Last I knew Appium could not utilize customized elements. Neither of the two [UIAButton] treeViewWidget… items that are displayed in the Inspector are what you’re looking for?

Hey there,
I think your development team needs to manually set their customized individual views as accessible. See my earlier post and also see this link

2 Likes

@Mani_Maran_Chandraba
As @shermaneric suggested, i too suspect the button and images are not made accessible by your developer.
Ask them to enable.

@hemche

Yep!!! That’s the issue :blush:
Thanks for your support guys @shermaneric @hemche

1 Like

will we be able to use x - y locations to tap on the UIImage?

[Refer to my solution here, its based on the X, Y co-ordinates] (Appium not seeing custom UIImageView / UIImage in XML)

@Mani_Maran_Chandraba
It’s kinda “issue” , main cause of problem that Apple native automator does not sees that element , that is why Appium also does not sees it.
As I recently discussed with iOS developer , this problem occurs only when developer wraps image inside other custom view ( example in TableCell ).
As i written in other post , u can take nearest element , after take coordinates of that element by element.getLocation() . Then shift coordinates point towards your Image , it will give you opportunity create relative tap by coordinates.

Thanks guys good thoughts. My 2 cents.
I stand by my last post as the most optimal solution.
That being said, there’s nothing stopping you from adopting the strategy of “get me the closest visible element and estimate the nearby x and y coordinates to eventually find my desired element to tap on”

I only fear that above strategy is prone to break once development does the slightest of iterations on that view. Furthermore as variant form factors come into play. You will have to fork your x/y offsets accordingly
Thanks
Eric

Yes this solved my problem. So ImageView is not accessible inside a table cell by default.