I am automating a hybrid app in IOS, not able to identify identify an element inside UIACollectionCell (Inside CollectionCell there are many element,some are visible and some not).
This is the tree
one more button is missing…
Need reason whether it is issue with Appium or development.
And suggest me some solution to overcome it…
Hmm,
I can’t think of a reason why Appium would prohibit any visibility inside of a UIACollecitonCell.
You can verify for certain whether or not this is a limitation to your App under Test (AUT) or to Appium by trying one of these 2 options:
I have a similar problem, only in my app it is a custom keyboard that the Appium Inspector cannot see. Sometimes it can see the alphanumeric keypad which is a displayable option of the custom keypad, but other times it can’t.
I also have the opposite problem. In a very large table view, iOS doesn’t really create all the underlying cells until you start scrolling. It actually only keeps a few cells in memory (the visible ones plus a few “boundary” cells) at any given time and puts new data into the existing cells as you scroll. Somehow Appium can see the hundreds of “invisible” cells in the table, but when I try to tell it to scroll to one of these it always fails.
Any tips on either of these visibility/interaction issues would be greatly appreciated!
I did this and I stubbed out the following:
An example of the appium inspector showing one button with a label and one without.
An example of reveal program comparing the same buttons.
An example of what the Storyboard in the source looks like comparing the same buttons
What I noticed:
Reveal and Appium seem to report the same results - that’s good.
It seems like if your app has a button icon without text and an accessibility label, hint, or identifier is not explicitly set - then the label does not show up upon interrogation. I’ll bet that’s what is happening wth you.
Takeaways:
I would encourage you to look at the Storyboard.xml that you have and see if that matches up with what I am saying.
@CMTaylor. You are correct. While you cannot scroll to the table cells ofscreen, you should be able to click on them. Do you need to scroll to them first? Otherwise I would just directly click. If you need to actually scroll to them first, I would do the TouchAction commands to swipe down page by page and check for your element each time. It’s not ideal, but it works
Hope it’s helpful. Let me know if further questions.
Thanks!
Honestly, I haven’t had the need to scroll on iOS as ui automation can “select” table rows offscreen and click them without the need to scroll.
I know there are scroll_to and scroll_to_exact methods in ruby. They previously had problems but if you search this board I believe things are better. I haven’t tried it out though.
In android I simply rely on touch actions with sadly the plain logic of "swipe down, check to see if my element is there…if not continue. There’s some logic for checking that I’m at the bottom of the screen by comparing the contents of the last table row on each iteration. Not ideal but it works.
More is here. I would try the scroo_to methods first though
Surely this depends on how the memory management comes in to play? , you can’t click on a cell that hasn’t been allocated yet, if your using dynamic tables & cell reusability.
+1 for Reveal, it’s a really good tool to debug accessibility / views in general.
I would trial the application and make adhoc changes to accessibility and see if the changes take affect correctly, if they do make similar changes to the project to reflect the accessibility hierarchy thats needed.
If you can share any snippet’s of code that replicate the issue I’m sure we will be able to assist, just pop it on a gist or repo
Hi, I have a similar issue with dropdown list, not able to inspect those list of items on iOS native app. My dev has added the accessibility identifier to the list and the code is
func makeUIView(context: Context) -> UITextField {
Appium Inspector (2022.5.4) is displaying the locator “stateTextField”, not “stateAutoCompleteTableView” for the dropdown list. Can you please suggest me, what could be the reason for the locator not displaying in App Source.