On Mon, 13 Apr 2026 14:21:30 GMT, Dmitry Markov <[email protected]> wrote:

> The root cause of the test failure is that the robot does not successfully 
> click on the "About" menu item. The test relies on hardcoded cursor 
> coordinates and the Y coordinate value (80) is insufficient on some macOS 
> systems with higher resolutions.
> 
> Replace the mouse click on the "About" menu item with keyboard interactions. 
> This removes the dependency on hardcoded cursor positions and makes the test 
> more robust across systems with different resolutions and font sizes.
> 
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

There was a reason for the mouse approach: the Spotlight search menu is not a 
node, it is a pure decoration that macOS adds to the Help menu. 

By adding a key event, we are always sure that the first JavaFX menuItem is 
going to be selected (key events won't be affected by decorations, whether they 
are there or not), and the test will never fail. 

However, the initial intention of this test was precisely to assert that there 
was a spotlight search decoration added precisely to the "Help" menu. I agree 
that using a hardcoded Y offset was probably a bad idea (as it didn't take into 
account multiple resolutions). 

Could we find a better way?

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

PR Comment: https://git.openjdk.org/jfx/pull/2147#issuecomment-4237880831

Reply via email to