import org.netbeans.jemmy.*; import org.netbeans.jemmy.explorer.*; import org.netbeans.jemmy.operators.*; public class QueueUsingSample implements Scenario { public int runIt(Object param) { try { //start application new ClassReference("org.netbeans.jemmy.explorer.GUIBrowser").startApplication(); //wait frame JFrameOperator mainFrame = new JFrameOperator("GUI Browser"); //push menu new JMenuBarOperator(mainFrame).pushMenuNoBlock("Tools|Properties", "|"); //wait for queue to be empty new QueueTool().waitEmpty(100); //since queue is empty, dialog has already been created and displayed. //find (not wait) dialog using low-level functionality System.out.println(JDialogOperator.findJDialog("Properties", false, false).getTitle()); } catch(Exception e) { e.printStackTrace(); return(1); } return(0); } public static void main(String[] argv) { String[] params = {"QueueUsingSample"}; org.netbeans.jemmy.Test.main(params); } }