Hey Alex,
Not all the widgets that appear in a JavaFX app are subclasses of
java.awt.Component and are not necessarily discoverable through
walking the Component hierarchy. I haven't looked too deeply into
this but the implement is really riding atop the Scenegraph model. A
scenegraph Node is not an awt.Component and therefore Nodes do not
show up in the Component hierarchy. If FEST is relying on the
Component hierarchy it might be missing things.
There is some kind of containering of scenegraph Nodes into the
Component hierarchy. But at some point in FEST you'll have to switch
search strategies to look through the Node hierarchy.
We should have this discussion on the java-gui-testing group on
yahoo.groups.
Another issue here is that the toolset you've developed and the other
Java GUI testing tools are not relevant when the app is on a mobile
device. The MIDP platform does not include java.awt.Robot and a Robot
based tool cannot be used for automating test execution on a mobile
device.
And as Josh said.. Robot can click anywhere on the screen so it's not
an issue with Robot. It is an issue with testability.
- David Herron
On Dec 11, 8:57 am, "Alex Ruiz" <
alex.ruiz...@gmail.com> wrote:
> Greetings,
>
> I've been trying to perform a functional test on a very simple JavaFX UI.
> The test is written in Java and needs to instantiate and show the JavaFX UI
> to test. It was tricky, but finally I got it working. I'm using FEST-Swing
> (disclaimer: I'm the creator) to simulate user input and test the UI. Under
> the covers, FEST uses the AWT Robot, which generates *native* user input
> events. Clicking on a button works fine on a plain-old Swing UI, but fails
> miserably on a JavaFX one. I suspect there is a bug in the action listener
> that JavaFX attaches to the JButtons. It seems that testability was not in
> the scope of JavaFX.
>
> I documented my experience athttp://
www.jroller.com/alexRuiz/entry/using_fest_swing_to_discover