JAuto: Lightweight Java GUI Automation

JAuto is an open-source lightweight agent for automating Java GUI apps. It lets you keep track of UI components, their coordinates, and states. Talk to JAuto via bash scripts and perform automation using an input simulator.

Benefits

  • No target app source code is necessary.
  • No Java programming is necessary. Compatible with most programming languages for automation control.
  • Shallow learning curve: one way of communication, a handful of commands.
  • Very lightweight and efficient, near-zero overhead.
  • Works in a headless container.

Under the hood

JAuto is a JVMTI (Java Virtual Machine Tool Interface) agent, running native code in the Java virtual machine. It is capable of iterating through instances of UI components and fetching their properties. You send a command to JAuto’s named pipe to communicate with it. When finished, JAuto writes the output of the command to a file. See communication protocol for details.

The UI component properties JAuto can fetch include:

  • Class name and package name in dot notation
  • Class name and package name of the base class (beginning with java. or javax.)
  • Component screen location and dimensions
  • Component-specific attributes such as text, selected

Copyright © 2022 He Shiming <heshiming at gmail dot com>.