I'm adding a child view to my view programmatically, and when I do I attach all accessibility params to it:
[labelView setAccessibilityLabel:@"label"];
[labelView setIsAccessibilityElement:YES];
[labelView setUserInteractionEnabled:YES];
But when I query the UI like this:
let app = XCUIApplication()
app.staticTexts["label"]
The test fails because it couldn't find the view.
How do I deal with this, how to make dynamically added views available for UI Testing?