I use TestFX framework for test my javaFX application. I test my application like that :
@Test
public void shouldClickOnDeletMarkerButton() {
FxRobot bot = new FxRobot();
bot.robotContext();
bot.clickOn("#deleteMarkerButton");
bot.clickOn("javafx.scene.control.Alert.CANCEL_BUTTON"); //This doesn't work.
}
I would like him to click on the OK button of JavaFX Alert Dialogs, but I have not found a fx:id.
What is fx:id of JavaFX Alert OK Button ?
EDIT : I solve my problem, FxRobot know "read", it is enough make this :
@Test
public void shouldClickOnDeletMarkerButtonWhenAnyMarkerAsBeenCreated() {
bot.robotContext();
bot.clickOn("#deleteMarkerButton");
bot.clickOn("OK"); //Target text / Target Button / ...
}