Appium tests (iOS). Children of a XCUIElementTypeTable do not show, also the table has elements

I am automating my tests using appium. For this, I set the AutomationId of elements, and reference these in the tests.

But now I have a structure like this:

<ListView x:Name = "ResultList" ItemsSource="{Binding CurrentResults}" SelectedItem="{Binding CurrentSelection, Mode=TwoWay}" IsPullToRefreshEnabled="True">
             <Label Text="SomeText" AutomationId="AUTOMATE"/>

And in the output of appium inspector, I just see:


Without any children!
Why? How can I get the children to show up in appium inspector?




  • EliasNawfalEliasNawfal USMember
    edited October 25

    Your post helped me a lot so let me return the favor.

    You need to set Control.IsAccessibilityElement to true in a custom renderer or create an effect to be able to see items in Appium Inspector

        protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
            if (Control == null)
            Control.IsAccessibilityElement = true;

    After this, you can find them by Id

  • RudolfVonKrugsteinRudolfVonKrugstein DEMember ✭✭

    Hey EliasNawfal,

    Thank you very much, but unfortunately I still cannot get it to work even with your code.
    What kind of elements are you using? Are they in a ListView? Because I believe that is the problem. Which Element are you setting IsAccessibilityElement on?


  • EliasNawfalEliasNawfal USMember
    edited October 27

    I have a ViewCell in a ListView, where I have an Image with a TapGestureRecognizer on it. The Image was not accessible by Appium so I created a CustomRenderer for the Image with the code above and it worked.
    After this you can use the AutomationId _driver.FindElementById("AUTOMATE")

  • RudolfVonKrugsteinRudolfVonKrugstein DEMember ✭✭


    Thanks for the Help @EliasNawfal. I reported a bug for my Problem:

    Best Regards,

Sign In or Register to comment.