Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for some form of utility that can be run from the command line in Ubuntu that will click a button in a specific window. What I want to do is run a macro in the selenium IDE without having to take my hands off the keyboard.

share|improve this question
up vote 5 down vote accepted

You can use the xdotool command line utility to create mouse (and keyboard) events.

It is quite versatile, so you probably need to look at the manual to find the commands for your particular purpose.

For example, to move the cursor to pixel position 500,500 and click, you would run

xdotool mousemove  500 500
xdotool click 1 # 1 is the left button.
share|improve this answer
Perfect Thank you! – Zachary K Apr 11 '11 at 10:39

Your Answer


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.