Autograding GUI programs (Java)

Hello!

Is there any way to create autograding tests for graphical user interfaces? Something like TestFX in headless mode? For context, I teach an intro to OOP class (programming language: Java) using Github Classroom, and I would like to see if it is possible to assign coding problems about JavaFX/Swing.

Best,
Giovanni