-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make A11y Dump more generic via SnapshotTransformer #291
Comments
Thank you, as always. It seems that you would like to access the screen bitmap, is that correct? Or is there something else you want to do? |
At minimum I guess a clean API to capture the bitmap. But I'm hoping there is some interceptor style API to postprocess the bitmap with contextual info before comparison. |
I have a different use case for this. I want to focus on crucial screen elements, such as the visibility of a button. Therefore, I'd like to highlight that area with a square. We might need to develop more basic APIs rather than practical ones for this purpose. captureRoboImage() { roboCanvas ->
roboCanvas.drawRectWithText(onNodeWithTag('subscribe_button').toRoboComponent(), "Subscribe Button")
} |
@takahirom That sounds great. I think I could rework the current A11y transformer I have to do those draw operations. Although I hope it's possible to expand or reduce the result bitmap size. |
The A11y dump #55 doesn't suit my purpose. There isn't an easy way to supply an alternate strategy.
Ideally the existing A11y dump feature and other features could be implemented using a clean API.
Examples
I ended up using the
RoboComponent.Screen
class to grab a bitmap, then transforming it to show A11y info in a resized bitmap.See here https://github.com/google/horologist/pull/2182/files#diff-7d20314095381dcb544af22f8ddd40d6dd3121bd95864b77eaa155d724afa678R124
The text was updated successfully, but these errors were encountered: