From a testing perspective it seems a good idea to have a more abstract "document graph" to find certain elements in the UI (to check their state is correct).

However I see two problems, shown as inline comments below...


Am 13.04.23 um 20:55 schrieb Michael Strauß:
Now also suppose a method `printContentGraph(ContentNode root)`, which
does the same as before, but works on the content graph.
This is the output of that method:

javafx.scene.layout.VBox
....javafx.scene.control.MenuButton
........javafx.content.Text
This requires that a MenuButton always has a text, however a Skin could exist that does not contain any text node (but only a bitmap, a simple shape, etc.). AFAIK Skins separate controls from their concrete representation.
2) Defining the Content Model

The content graph consists of the content model of all participating
controls. Implementors are responsible for defining the content model
of a control by overriding the protected `buildContentModel` method,
and adding the content that is significant for the control:

Which means that the abovementioned use case as a tool for UI testing cannot be executed if any of the UI libraries (ControlsFX comes to mind) I use does not support this new model.


Best regards,

Robert


Reply via email to