Try using FEST-Swing testing for the Swing GUI and using the example from http://easytesting.org/swing/wiki/pmwiki.php?n=FEST-Swing.LaunchFromMain
Unfortunately, frame.isShowing () always returns false, although I can already see that JavaApp Swing works
See my codes
... ApplicationLauncher.application(JavaApp.class).start(); GenericTypeMatcher<Frame> matcher = new GenericTypeMatcher<Frame>(Frame.class) { protected boolean isMatching(Frame frame) { System.out.println("title:" + frame.getTitle() + " showing:" +frame.isShowing());
from console log
title: showing: false
Two questions:
1. I have to use Frame insteaf JFrame, otherwise it cannot be matched, it causes the wrong name, I expect the "Java application"
2. frame.isShowing () always returns false, it seems strange
BTW: The latest code requires a parameter for GenericTypeMatcher () RGS / Larry
source share