xType'ing a string is causing the default button to fire in a Java desktop App

I’m having a weird problem with xType. I’m trying to automate a Java App in Desktop Mode on macOS and running UI.Vision in Chrome.

I’m trying to xType the file name into a file save form.

When I xType individual key strokes the characters appear in the “Save As” field on the form as expected e.g.
xType | ${KEY_A}${KEY_B}${KEY_C}
Works as expected and the string “abc” appears in the “Save As” field.

However, when I use a string or a variable in the xType target:
(1) the first 6 characters are consumed,
(2) the default button on the form fires as if the enter key had been pressed (a “Save” button in this case), and
(3) the 7th and subsequent characters appear in the text field that receives focus on the parent form after the file save form has closed.

Can anyone suggest how I might debug this or a possible workaround?

Just to clarify: If you use explicit key presses like xType | ${KEY_A}${KEY_B}${KEY_C} it works, but xType | ABC` does not work?

Can you maybe post a video of the situation?

By way of clarification:

  1. I wrong about the default button firing, the form closes, but Save, which is the default button action, is not executed.

  2. Yes
    XType | ${KEY_A}
    XType | ${KEY_B}
    XType | ${KEY_C}
    will type the characters ABC successfully in the file name text box.

  3. Whereas
    XType | ABC
    XType | ${KEY_A}${KEY_B}${KEY_C}
    & XType | ${user_variable}
    all cause the Save form to close spontaneously without executing Save. Sometimes it is possible to see a character flash in the file name text box before the form disappears.

  4. In the attached screen capture, first “untitled” is cleared from the text box with KEY_DEL. Then “Wait” is successfully typed using separate XType commands for each KEY_ character. Then XType | List- is attempted, but the Save form closes instantly upon executing that command at Macro line 50.