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

[TEST_BUG] Automate PageDialogMarginTest.java test if possible

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd_major
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: