8

There is an existing JavaFX based application, which I should write automated tests for. I just started to use TestFX(version 4.0.13-alpha) and looking for advice, how to record and identify UI objects of application. I tried following code to initialize a button, but it couldn't be clicked.

Button button = new Button("click me!");

I found these GUI inspect tools, but not sure, which one could works with TestFX.

plaidshirt
  • 5,189
  • 19
  • 91
  • 181

1 Answers1

3

There is a really good documentation about TestFX queries which can be found on github (here). I would use the lookup(<label/buttontext>) version if it's not possible to define IDs on the components.

Halko Karr-Sajtarevic
  • 2,248
  • 1
  • 16
  • 14