evemu from the evemu-tools package can emulate devices like mouse, touchpads and keyboards in wayland. It cannot "read" what is happening on the screen but can easily move & click and "blindly" interact with the session.
sudo evemu-describe # list devices
if your mouse is /dev/input/event5
from the output of above command
the following will move mouse 50 pixels xy then right-press & let go of button:
sudo evemu-event /dev/input/event5 --type EV_REL --code REL_X --value 50
sudo evemu-event /dev/input/event5 --type EV_REL --code REL_Y --value 50
sudo evemu-event /dev/input/event5 --type EV_KEY --code BTN_RIGHT --value 1
sudo evemu-event /dev/input/event5 --type EV_KEY --code BTN_RIGHT --value 0
You can also record a particular sequence and re-play it:
# press ctrl-c to stop recording
sudo evemu-record /dev/input/event5 /tmp/mouse-sequence
# to replay session
sudo evemu-play /tmp/mouse-sequence
pynput
library not working as expected in Python to press Windows + D key