Skip to content
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

Add UI automation portal #565

Open
Jmgr opened this issue Feb 25, 2021 · 8 comments
Open

Add UI automation portal #565

Jmgr opened this issue Feb 25, 2021 · 8 comments
Labels
new portals This requires creating a new portal interface

Comments

@Jmgr
Copy link

Jmgr commented Feb 25, 2021

Would it be possible to add an automation portal? I'm the developer of Actiona, a UI automation tool, and I'm trying to migrate away from using XTest to simulate mouse and keyboard actions.

I know there is RemoteDesktop and ScreenCast, but their use-case is a bit different and they don't provide all the required features.

This portal could include input and windowing events/actions, like:

  • Mouse events (motion, button pressed/released)
  • Get and set absolute cursor position (warp)
  • Keyboard events (key pressed/released)
  • Press and release keys (both with and without keyboard layout translation)
  • Choose a position on screen (like Screenshot.PickColor, but returns an absolute position)
  • Choose a rectangle on screen
  • Choose a color on screen (Screenshot.PickColor does that)
  • Choose a window on screen
  • List windows
  • Get and set the foreground window
  • Close/minimize/maximize/... windows
@KotoWhiskas
Copy link

Agree, also ability to send keyboard/mouse events to particular windows even when they are not focused would be useful

@KotoWhiskas
Copy link

This would also help to resolve the keepassxc issue with autotyping on wayland.

@orowith2os
Copy link

This should be resolved with the creation of libei and the appropriate portal updates to go with it already.

@KotoWhiskas password managers are a separate problem, and as far as I can see, are a bit stalled in different areas.

@swick
Copy link
Collaborator

swick commented Sep 8, 2023

libei is made for emulating devices, not for automating UI. Different use cases, different requirements.

@orowith2os
Copy link

orowith2os commented Sep 8, 2023

Different use cases, different requirements.

Is there anything in particular blocking libei from doing this? I'd figure not. You can 100% automate stuff with it. How well, depends..

Another path to take is abusing future accessibility stuff for automation, which I think already works.

@swick
Copy link
Collaborator

swick commented Sep 8, 2023

Is there anything in particular blocking libei from doing this?

Yes. It operates on the level of a device. It can't warp a pointer to a specific location because devices don't even know there is a thing with locations. Similarly an emulated keyboard can't give you specific text because it has no concept of a keymap.

@whot
Copy link
Contributor

whot commented Sep 26, 2023

sorry, that's not quite correct: libei keyboards can have a keymap that's assigned by the EIS implementation, basically the same as wl_keyboard. And absolute devices have "Regions" which are also assigned to by the EIS implementation, that's how the remote desktop stuff works and how we can map the absolute input devices to the respective streams too (esp with the new region mapping id in libei 1.1).

but it's true that libei itself is just a transport layer, most of the decisions would have to be part of the portal API.

@swick
Copy link
Collaborator

swick commented Sep 29, 2023

Oh, totally forgot about absolute pointer devices. Maybe it is useful for automation after all?

@GeorgesStavracas GeorgesStavracas moved this to Needs Triage in Triage Oct 2, 2023
@GeorgesStavracas GeorgesStavracas added the new portals This requires creating a new portal interface label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new portals This requires creating a new portal interface
Projects
No open projects
Status: Needs Triage
Development

No branches or pull requests

6 participants