Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UI automation tools for iOS apps that can identify CALayer objects

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?

like image 412
user1800035 Avatar asked Oct 06 '22 02:10

user1800035


1 Answers

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.

like image 113
Jonathan Penn Avatar answered Oct 10 '22 04:10

Jonathan Penn