I found that FEST-Swing has the capability to automate UI actions on Java applets.
FEST-Swing can also test desktop applications as well as applets (in a viewer and in-browser.)
I tried to prepare a script to see its capabilities, but I could not figure out how to load an applet source to FEST to take actions.
How can I load a Java Applet into FEST? Specifically, I would like an example on how to load the below applet in to FEST. http://java.sun.com/applets/jdk/1.4/demo/applets/GraphicsTest/example1.html
All I want in the script is to click on Next and Previous buttons.
how to load an
Applet
to aFramFixture
is described here. To get this running you need to change the type of the Next-Button fromButton
toJButton
because FEST works only on SWING Components and not on AWT Components. Additional you have to set the Name of the Button, so that FEST can identity the button in the testcase. To do this, add this line:now you can find your Button in the testcase. I used this TestCase and it worked well: