01: package org.netbeans.jemmy.testing;
02:
03: import org.netbeans.jemmy.*;
04:
05: import org.netbeans.jemmy.operators.*;
06: import org.netbeans.jemmy.util.*;
07:
08: import java.awt.*;
09:
10: import javax.swing.*;
11:
12: public class jemmy_037 extends JemmyTest {
13:
14: public int runIt(Object obj) {
15:
16: try {
17:
18: (new ClassReference(
19: "org.netbeans.jemmy.testing.Application_037"))
20: .startApplication();
21:
22: JFrame win = JFrameOperator.waitJFrame("Application_037",
23: true, true);
24:
25: JFrameOperator fro = new JFrameOperator(win);
26: JTabbedPaneOperator tb = new JTabbedPaneOperator(fro);
27: Thread.sleep(1000);
28:
29: tb.selectPage("Swing");
30:
31: //swing
32: JScrollBarOperator scroll0 = new JScrollBarOperator(fro);
33: scroll0.scrollToMaximum();
34: scroll0.scrollToMinimum();
35: JScrollBarOperator scroll1 = new JScrollBarOperator(fro, 1);
36: scroll1.scrollToMaximum();
37: scroll1.scrollToMinimum();
38:
39: //awt scroll
40: tb.selectPage("AWT");
41: ScrollbarOperator awscroll0 = new ScrollbarOperator(fro);
42: awscroll0.scrollToMaximum();
43: awscroll0.scrollToMinimum();
44: ScrollbarOperator awscroll1 = new ScrollbarOperator(fro, 1);
45: awscroll1.scrollToMaximum();
46: awscroll1.scrollToMinimum();
47:
48: } catch (Exception e) {
49: finalize();
50: throw (new TestCompletedException(1, e));
51: }
52:
53: finalize();
54:
55: return (0);
56: }
57:
58: }
|