Introduction

Swingcorder's capabilities are centered around playback "scripts", which are simply Java methods containing code that simulates mouse and keyboard input. For example, a script could be created by recording user input for a Swing application like the one shown below:

Clicking on the "Clear Group" button results in the creation of Java code like the following:
public void runScript_1() { JFrame jframe0 = findFrame("Test Frame"); activateWindow(jframe0); JTabbedPane tabbedPane0 = findTabbedPane(jframe0, "Table"); JPanel panel0 = ((JPanel) getTabbedPaneTabComponent(tabbedPane0, "AbstractButton")); JButton button0 = findButton(panel0, "Clear Group"); clickButton(button0); }
Swingcorder's intelligent script generation produces Java code that imitates the way a human user might describe user input ("Find the button labeled 'Clear Group' on the 'AbstractButton' tab and click the button"). Combined with a simple but powerful API, the result is scripts that are simple but that don't need to be updated whenever minor changes are made to the Swing application's user interface.

Script Creation

Scripts can be created manually, but are more commonly created automatically through a plugin installed within an Integrated Development Environment (IDE) such as Eclipse. A Swingcorder plugin allows you to record user input and to use the recorded data to generate a script that can recreate the original input. In this case, for example, the script can mimic the clicking of the "Clear Group" button.

Script Playback

Once a script has been created -- either automatically through a plugin or manually by a programmer -- the script code can be used to simulate user input. Playback normally occurs in one of two scenarios:

In other words, the recording and automatic generation of scripts requires the installation of a plugin, while playback can be accomplished without one.