Bryan Casler
Bryan Casler

Reputation: 617

How to script keyboard clicks in a browser on a mac

The title says it all. I'm trying to script keyboard clicks in the browser (preferably Chrome). It's simple, from the current page I want to tab through 5 elements, then click enter, then repeat.

Right now I'm using a trial of the mac App "Fake" but it seems overly complicated for what I'm trying to do. I'm new to Macs and having trouble figuring out the simplest way to accomplish this. Any suggestions?

Upvotes: 1

Views: 139

Answers (1)

Bill Agee
Bill Agee

Reputation: 3646

I'd take a look at Sikuli. It has a lot of things in its favor:

  • Comes with a nice starter IDE (or, you can write scripts in your own editor)
  • You can write Sikuli scripts in Jython, which is nice if you already know (or want to learn) Python
  • There's a Java API too, should you want to use pure Java
  • Sikuli's ability to do fuzzy matching of screenshots can be surprisingly robust
  • Scripts can be run from the command line once you grow out of the IDE (or want to plug the scripts into a continuous integration system)

Upvotes: 1

Related Questions