Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record UI elements for TestFX

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.

like image 582
plaidshirt Avatar asked Jul 31 '18 09:07

plaidshirt


1 Answers

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.

like image 111
Halko Karr-Sajtarevic Avatar answered Sep 20 '22 19:09

Halko Karr-Sajtarevic