On Thu, 23 Oct 2025 13:55:03 GMT, Alexey Ivanov <[email protected]> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   review update
>
> test/jdk/javax/swing/JFileChooser/bug4759934.java line 81:
> 
>> 79:             }
>> 80:             Point cancelLoc = Util.getCenterPoint(cancel);
>> 81:             robot.mouseMove(cancelLoc.x, cancelLoc.y);
> 
> I am not sure this is the way to go… However, 
> [JDK-4759934](https://bugs.openjdk.org/browse/JDK-4759934) doesn't seem to 
> depend on how the dialog is closed by pressing <kbd>Esc</kbd> or by clicking 
> the **Cancel** button. If it's the case, click the button programmatically by 
> calling `cancel.doClick()`, it's even less error-prone than clicking the 
> button with a robot by sending mouse click.

cancel.doClick() seems to be a better option. Updated.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27944#discussion_r2457325240

Reply via email to