I'm trying to automate tests that test an app that has CA Layer objects. UI automation framework given by Apple does not identify CA Layer objects. I want a list of ui automation tools that help in identifying CA Layer objects. Can I get the list of tools please?
UI Automation cannot access the CA Layer objects because they are not exposed to the accessibility mechanism in iOS. You can expose your layers to the accessibility API's by starting with an object that conforms to the UIAccessibilityContainer
protocol. That object would provide a set of UIAccessibilityElement
objects that would mirror the representation of your CA Layers. At that point, UI Automation would be able to "see" what the user sees when looking at the raw CA layers.
You get two benefits with this strategy. Your app is now accessible through things like Voice Over for the visually impaired, and you have a way to talk to your app through UI Automation.
This is what Apple recommends for apps that don't use the native UIKit
functionality that does accessibility for you. IMHO, I think it's a good idea to follow this path because Apple's betting big on accessibility features and it's only going to go deeper with integration into the OS in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With