check the relative order of Nodes in a container?

12 views
Skip to first unread message

Chris Merrill

unread,
Oct 22, 2017, 5:34:47 PM10/22/17
to TestFX
I'm writing tests that need to verify that GUI components are ordered correctly (visually) top to bottom after the user performs an operation that reorders them. Since queryAll() returns a LinkedHashSet, which features predictable iteration order, I was hoping that they would be returned in the order they appear visually in the tree/DOM. Instead, when I use queryAll().iterator() based on class names, they appear in the order they were added to the container.

The components that I am checking are in a GridPane...which means that the order they appear in the parents child list is not necessarily the order they appear in the GUI. So I can't use that to determine the location in the UI.

Anyone have a suggestion?  Is there an API in TestFX that will help me here?  How have you tacked this testing problem?

TIA!
Chris
Reply all
Reply to author
Forward
0 new messages