21 * questions.
22 */
23
24 import com.sun.swingset3.demos.button.ButtonDemo;
25 import org.jtregext.GuiTestListener;
26 import java.awt.Point;
27 import java.awt.Robot;
28 import java.awt.event.InputEvent;
29 import java.awt.image.BufferedImage;
30 import org.netbeans.jemmy.ClassReference;
31 import org.netbeans.jemmy.image.StrictImageComparator;
32 import org.netbeans.jemmy.operators.JButtonOperator;
33 import org.netbeans.jemmy.operators.JFrameOperator;
34 import static org.jemmy2ext.JemmyExt.*;
35 import org.testng.annotations.Test;
36 import static com.sun.swingset3.demos.button.ButtonDemo.*;
37 import org.testng.annotations.Listeners;
38
39 /*
40 * @test
41 * @key headful screenshots
42 * @summary Verifies buttons on SwingSet3 ButtonDemo page by clicking each
43 * button, taking its screenshots and checking that pressed button
44 * image is different from initial button image.
45 *
46 * @library /sanity/client/lib/jemmy/src
47 * @library /sanity/client/lib/Extensions/src
48 * @library /sanity/client/lib/SwingSet3/src
49 * @build org.jemmy2ext.JemmyExt
50 * @build com.sun.swingset3.demos.button.ButtonDemo
51 * @run testng ButtonDemoScreenshotTest
52 */
53 @Listeners(GuiTestListener.class)
54 public class ButtonDemoScreenshotTest {
55
56 private static final int BUTTON_COUNT = 6; // TODO: Decide about "open browser" buttons (value was 8 originally)
57
58 @Test
59 public void test() throws Exception {
60 Robot rob = new Robot();
61
|
21 * questions.
22 */
23
24 import com.sun.swingset3.demos.button.ButtonDemo;
25 import org.jtregext.GuiTestListener;
26 import java.awt.Point;
27 import java.awt.Robot;
28 import java.awt.event.InputEvent;
29 import java.awt.image.BufferedImage;
30 import org.netbeans.jemmy.ClassReference;
31 import org.netbeans.jemmy.image.StrictImageComparator;
32 import org.netbeans.jemmy.operators.JButtonOperator;
33 import org.netbeans.jemmy.operators.JFrameOperator;
34 import static org.jemmy2ext.JemmyExt.*;
35 import org.testng.annotations.Test;
36 import static com.sun.swingset3.demos.button.ButtonDemo.*;
37 import org.testng.annotations.Listeners;
38
39 /*
40 * @test
41 * @key headful screenshots intermittent
42 * @summary Verifies buttons on SwingSet3 ButtonDemo page by clicking each
43 * button, taking its screenshots and checking that pressed button
44 * image is different from initial button image.
45 *
46 * @library /sanity/client/lib/jemmy/src
47 * @library /sanity/client/lib/Extensions/src
48 * @library /sanity/client/lib/SwingSet3/src
49 * @build org.jemmy2ext.JemmyExt
50 * @build com.sun.swingset3.demos.button.ButtonDemo
51 * @run testng ButtonDemoScreenshotTest
52 */
53 @Listeners(GuiTestListener.class)
54 public class ButtonDemoScreenshotTest {
55
56 private static final int BUTTON_COUNT = 6; // TODO: Decide about "open browser" buttons (value was 8 originally)
57
58 @Test
59 public void test() throws Exception {
60 Robot rob = new Robot();
61
|