I'm writing a JavaFX application with a menubar. I have given the menu items CSS ids, and I want to use TestFX to click on them. Here's the code:
clickOn("#menu-file").clickOn("#menu-file-new-project");
When I run this I can see my mouse move to the completely wrong place on the screen, and then the test fails saying it couldn't find any elements matching #menu-file-new-project
. I'm assuming it can't find them because it's never opening the File menu, because it's clicking in the wrong location.
What should I do about that? Windows 10, Java 8u120, TestFX 4.0.6. For the record it fails the same way in monocle headless mode