Thanks Tom for the pointer.
I was advised against using GuiTest as its part of legacy.
I have written this simple test. The test blocks when I use alert.showAndWait(). I would want to test dialog boxes in my application which are modal in nature. Hence I must use showAndWait(). Unfortunately this blocks the test from executing.
public class DialogBoxTest extends ApplicationTest {
GitFxDialog dialog;@Override
public void start(Stage stage) throws Exception {Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle(title);
alert.setHeaderText(header);
alert.setContentText(label);
alert.show();
return alert;}
@Test
public void testDialog() throws Exception {
clickOn("OK");
}
Thanks,
Rohit Vaidya