Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8272344

[TEST_BUG] Automate PageDialogMarginTest.java test if possible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • client-libs
    • 2d

      The java/awt/print/PrinterJob/PageDialogMarginTest.java test is a manual test. Can it be automated.

      There's no direct access to the dialog displayed. However, it should become the active window when it's shown. Using AWTEventListener, it should be possible get a focus or activation event which would be confirmation the dialog is displayed. Alternatively KeyboardFocusManager could be used to check that there's a focused component, or an active window.

      Then the Robot could press Alt+T to move focus to "top (in)" field and edit the value of the field: press Delete key to remove "1" and press "2" key to type 2. Pressing Enter would click OK and close the dialog.

            rmahajan Rajat Mahajan
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: