Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

pywinauto is a set of python modules to automate the Microsoft Windows GUI. At it’s simplest it allows you to send mouse and keyboard actions to windows dialogs and controls.

Is there a linux-equivalent of this python module?

thanks!

share|improve this question

1 Answer 1

The linux desktop testing project (ldtp) should offer what you need. With the python-ldtp Install python-ldtp package, you can write scripts in python. The project uses the accessibility methods to perform actions, so the application in question has to be a “standard” GTK/QT/… application and you need to enable accessibility (“Assistive technologies”).

The following python script would click the “New” button in an (already existing) gedit window and enter the string “foo”:

#!/usr/bin/python

from ldtp import *
from ldtputils import *
click('*-gedit', 'btnNew') 
generatekeyevent('foo')
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.