I am testing an app with ios uiautomation and I need to verify the color of some static text controls. Is this possible? I didn't see any methods or properties that allow access to text styling.
I don't know how much you have already implemented using UI Automation, but if you have not yet invested too much I would strongly recommend using FoneMonkey instead. It has an excellent script recording facility, outputs Objective C/SenTestCase scripts, and the scripts have full access to the internal of your program so that you can test color or any other property you like. It is easily extensible, and I have also generally found it to be much less of a pain to work with than UI Automation.
There is no way to do this using standard accessibility on iOS. You could modify the accessibilityValue for the element with a string representation of the color, but this seems like it would create a poor experience for vision impaired users.
© 2022 - 2024 — McMap. All rights reserved.