< prev index next >

test/sanity/client/SwingSet/src/ScrollPaneDemoTest.java

Print this page




  23 
  24 import org.jtregext.GuiTestListener;
  25 import com.sun.swingset3.demos.scrollpane.ScrollPaneDemo;
  26 import static com.sun.swingset3.demos.scrollpane.ScrollPaneDemo.DEMO_TITLE;
  27 import static org.testng.AssertJUnit.*;
  28 import org.testng.annotations.Test;
  29 import org.netbeans.jemmy.ClassReference;
  30 import org.netbeans.jemmy.operators.JFrameOperator;
  31 import org.netbeans.jemmy.operators.JScrollPaneOperator;
  32 import org.testng.annotations.Listeners;
  33 
  34 /*
  35  * @test
  36  * @key headful
  37  * @summary Verifies SwingSet3 ScrollPaneDemo by scrolling to bottom, to top,
  38  *          to left and to right and checking scroll bar values.
  39  *
  40  * @library /sanity/client/lib/jemmy/src
  41  * @library /sanity/client/lib/Extensions/src
  42  * @library /sanity/client/lib/SwingSet3/src

  43  * @build org.jemmy2ext.JemmyExt
  44  * @build com.sun.swingset3.demos.scrollpane.ScrollPaneDemo
  45  * @run testng ScrollPaneDemoTest
  46  */
  47 @Listeners(GuiTestListener.class)
  48 public class ScrollPaneDemoTest {
  49 
  50     @Test
  51     public void test() throws Exception {
  52 
  53         new ClassReference(ScrollPaneDemo.class.getName()).startApplication();
  54 
  55         JFrameOperator frame = new JFrameOperator(DEMO_TITLE);
  56         JScrollPaneOperator jspo = new JScrollPaneOperator(frame);
  57 
  58         // Set initial scrollbar positions
  59         int initialVerticalValue = jspo.getVerticalScrollBar().getValue();
  60         int initialHorizontalValue = jspo.getHorizontalScrollBar().getValue();
  61 
  62         System.out.println("Initial Vertical Value = " + jspo.getVerticalScrollBar().getValue());




  23 
  24 import org.jtregext.GuiTestListener;
  25 import com.sun.swingset3.demos.scrollpane.ScrollPaneDemo;
  26 import static com.sun.swingset3.demos.scrollpane.ScrollPaneDemo.DEMO_TITLE;
  27 import static org.testng.AssertJUnit.*;
  28 import org.testng.annotations.Test;
  29 import org.netbeans.jemmy.ClassReference;
  30 import org.netbeans.jemmy.operators.JFrameOperator;
  31 import org.netbeans.jemmy.operators.JScrollPaneOperator;
  32 import org.testng.annotations.Listeners;
  33 
  34 /*
  35  * @test
  36  * @key headful
  37  * @summary Verifies SwingSet3 ScrollPaneDemo by scrolling to bottom, to top,
  38  *          to left and to right and checking scroll bar values.
  39  *
  40  * @library /sanity/client/lib/jemmy/src
  41  * @library /sanity/client/lib/Extensions/src
  42  * @library /sanity/client/lib/SwingSet3/src
  43  * @modules java.desktop
  44  * @build org.jemmy2ext.JemmyExt
  45  * @build com.sun.swingset3.demos.scrollpane.ScrollPaneDemo
  46  * @run testng ScrollPaneDemoTest
  47  */
  48 @Listeners(GuiTestListener.class)
  49 public class ScrollPaneDemoTest {
  50 
  51     @Test
  52     public void test() throws Exception {
  53 
  54         new ClassReference(ScrollPaneDemo.class.getName()).startApplication();
  55 
  56         JFrameOperator frame = new JFrameOperator(DEMO_TITLE);
  57         JScrollPaneOperator jspo = new JScrollPaneOperator(frame);
  58 
  59         // Set initial scrollbar positions
  60         int initialVerticalValue = jspo.getVerticalScrollBar().getValue();
  61         int initialHorizontalValue = jspo.getHorizontalScrollBar().getValue();
  62 
  63         System.out.println("Initial Vertical Value = " + jspo.getVerticalScrollBar().getValue());


< prev index next >