If font type checking possible for Native app

iOS or Android, either will be helpful. In a native app, is there any way to determine the font for elements? Marketing have a custom font that we use in our Native ios and androdi app. Sometimes the devs forget, just sometimes.

It seems to have been asked a few times over the years, and no answer.

Will Appium eyes do this “reliably” without guessing somehow? Or are we all just asking the wrong question.

Only way I can think is to compare screenshots. I would think such a test would be very fragile, and you would probably have to use the same device each time you tested.

Probably could use something like https://imagemagick.org/ to cut screenshot down to just the area needed and then mathematically compare the two.

Honestly this seems like it should be a unit test. If dev forgot setting, fail unit test before even building app.

1 Like

I assume it would only be possible with drivers similar to Espresso, which have access to internal app codebase. Accessibility-based drivers, like xcuitest or uia2 only have access to what the accessibility layer exposes to them. Font type does not belong to the list of exposed things though.

Yes. The selenium wire protocol was probably never designed for this class of information, so I’m not expecting platform wrappers for that would soon implement it either. At least not in the medium term. Which is why I’m interested in alternative tools, even some xcuitest undocumented magic might be of value here. Image diff tools I fear might just do their normal thing and only detect regressions, and merely create noise. I’m interested in any tool that can do static analysis on a per screenshot bases perhaps?