Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.Timeout


        //new Action("Tools|Generate Report", null).perform();
        //new Timeout("pausing", 1000).sleep();
        MainWindowOperator mwo = MainWindowOperator.getDefault();
        JButtonOperator jbo = new JButtonOperator(mwo, "Generate Report");
        jbo.pushNoBlock();
        new Timeout("pausing", 1000).sleep();
    }
View Full Code Here


        JButtonOperator jbo0 = new JButtonOperator(reportDialogOperator, "Next");
        DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss");
        Date date = new Date();
        String datenotime = dateFormat.format(date);
        listOperator.clickOnItem(1, 1);
        new Timeout("pausing", 1000).sleep();
        jbo0.pushNoBlock();
        new Timeout("pausing", 1000).sleep();
        JButtonOperator jbo1 = new JButtonOperator(reportDialogOperator, "Finish");
        jbo1.pushNoBlock();
        new Timeout("pausing", 500).sleep();
        JDialog previewDialog = JDialogOperator.waitJDialog("Progress", false, false);
        screenshot("Progress");
        JDialogOperator previewDialogOperator = new JDialogOperator(previewDialog);
        JLabel waiter = JLabelOperator.waitJLabel(previewDialog, "Complete", false, false);
        JButtonOperator jbo2 = new JButtonOperator(previewDialogOperator, "Close");
        jbo2.pushNoBlock();
        new Timeout("pausing", 3000).sleep(); // Give the program a second to idle to be safe
        System.setProperty("ReportStr", datenotime);
        screenshot("Done Testing");
    }
View Full Code Here

        try {
            Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
            BufferedImage capture = new Robot().createScreenCapture(screenRect);
            String outPath = System.getProperty("out_path");
            ImageIO.write(capture, "png", new File(outPath + "\\" + name + ".png"));
            new Timeout("pausing", 1000).sleep(); // give it a second to save
        } catch (IOException ex) {
            logger.log(Level.WARNING, "IOException taking screenshot.", ex);
        } catch (AWTException ex) {
            logger.log(Level.WARNING, "AWTException taking screenshot.", ex);
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.Timeout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.