Is there a Python equivalent to Java's AWT Robot class?
11,291
Solution 1
If you have GTK, then you can use the gtk.gdk.Display class to do most of the work. It controls the keyboard/mouse pointer grabs a set of gtk.gdk.Screen
objects.
Solution 2
Check out GNU LDTP:
GNU/Linux Desktop Testing Project (GNU LDTP) is aimed at producing high quality test automation framework [...]
Especially Writing LDTP test scripts in Python scripting language
Author by
Stuart K
Updated on June 05, 2022Comments
-
Stuart K almost 2 years
Does anyone know of a Python class similar to Java Robot?
Specifically I would like to perform a screen grab in Ubuntu, and eventually track mouse clicks and keyboard presses (although that's a slightly different question).
-
Stuart K about 15 yearsThanks very much, this is exactly what I was looking for.
-
Stuart K about 15 yearsThanks Benji, I'll be having a look at this as well.
-
Jamie over 8 yearsExample of use: stackoverflow.com/questions/69645/…
-
rsarro over 5 yearsRobotFramework can be used outside of web automation. Selenium is just one of the drivers