Changes to isAccessibilityElement are not picked up by waitForExpectationWithTimeout
Originator: | aaron | ||
Number: | rdar://28085878 | Date Originated: | 08/30/2016 |
Status: | Open | Resolved: | |
Product: | XCode | Product Version: | 7.3.1 |
Classification: | UI/UX | Reproducible: | Always |
Area: Xcode Summary: Changes to the isAccessibilityElement attribute of a UI element (in this case, an otherElement, unknown if it's general) correctly propagate out to the accessibility hierarchy (such as may be printed from an XCUITest using, e.g., print(app.otherElements) ) but are not picked up by waitForExpectationsWithTimeout because the Snapshot is never refreshed. Or so it seems. Steps to Reproduce: 1. Create a UI element in your code 2. Set up a UI Test with waitForExpectationWithTimeout that waits for the existence of that element 3. In code, set the element to start out as not accessible%2C but then to become accessible after a short span of time Expected Results: Expectation is fulfilled, because the wait function properly pulls in the new hierarchy once the hierarchy changes Actual Results: Expectation fails and test fails, because the element is not in whatever cache the expectation is using for its hierarchy snapshot and it doesn't do a new pull. Version: XCode 7.3.1, iOS 9.2 Simulator Notes: If you set a breakpoint and then immediately “Go” after it%2C everything passes. Configuration: iPad Air 2 Simulator running on Macbook Pro
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!