Automating ubuntu-frame input/keyboard

Hey, we are using Ubuntu Frame to show our intercom app(snapped Flutter app) in our intercom panel.

We are looking for a way to automate inputs for testing purposes.

I was looking to have a snap(we can sideload for testing UI snap ) that can send fake input/keyboard events by utilizing zwlr_virtual_pointer_manager_v1 and zwp_virtual_keyboard_manager_v1 protocols, What I saw is ubuntu frame have a limitation on exposing protocols to other snaps.

AuthModel const auth_model{{ {“ubuntu-frame-osk”, { WaylandExtensions::zwlr_layer_shell_v1, WaylandExtensions::zwp_virtual_keyboard_manager_v1, WaylandExtensions::zwp_input_method_manager_v2, }}, {“ubuntu-frame-vnc”, { WaylandExtensions::zwlr_screencopy_manager_v1, WaylandExtensions::zwlr_virtual_pointer_manager_v1, WaylandExtensions::zwp_virtual_keyboard_manager_v1, }}, {“ubuntu-frame”, { WaylandExtensions::zwlr_screencopy_manager_v1, WaylandExtensions::zwlr_layer_shell_v1, WaylandExtensions::zwlr_foreign_toplevel_manager_v1 }}, }};

I extended this list with my new snap name and the protocols I need from my testing snap, and I ended up able to automate some UI flows.

Now I am wondering if that is the correct approach to test UI flows. If so, what would be the possibility of having an extendable list of auth_models?

Otherwise, happy to hear your suggestions.

Thank you.

@alan_g Maybe you do have some ideas?

Hi @aliihsan,

we are aware that the current implementation which hardcodes privileged extension permissions isn’t flexible or extensible. And the problems this causes. (See https://github.com/canonical/ubuntu-frame/issues/201)

We have plans to address this (which should happen in the next few months).

However, for your case, i.e. testing, it is possible to enable these protocols globally using the Ubuntu Frame’s config configuration option. (See https://ubuntu.com/frame/docs/24/reference/ubuntu-frame-configuration-options/, in particular the use of add-wayland-extensions)

HTH

1 Like

Indeed add-wayland-extensions worked, now i can interact with device UI. Thanks @alan_g

My workflow is mostly based on pixels on UI. I was wondering if there would be a way to extract components somehow,

maybe utilizing at-spi2-atk bridge?