Monocle in 8u25
Benjamin Gudehus
hastebrot at gmail.com
Sat Nov 15 00:48:42 UTC 2014
You can find the PR for headless support in TestFX here:
https://github.com/TestFX/TestFX/pull/159
There are some issues with the Glass robot. We need this robot in order to
simulate user interactions in headless mode.
One problem is, that the Glass robot *(1) requires an JavaFX application*
to be set up. TestFX initializes the robots first and then launches the
Application. I worked-around this problem, by initializing the Glass robot
just before the first user interaction is made.
Another problem is, that the Glass robot *(2) requires interactions to be
run within the JavaFX thread*. From the integration tests I've wrote it
looks that we need to wait for the events in the JavaFX thread to complete
for certain interactions, e.g. we need to wait after mouseMove() in order
to do mouseClick(). With the AWT robot we only needed to wait for the
events triggered by interactions to complete (let's call them
post-interaction events). Now it seems that we also need to wait for the
interactions itself to complete, which then will also trigger the
post-interaction events. I'll need to visualize different interaction
events, post-interaction events and the event waiting, and decide when we
need to use the semaphore solution we currently use to wait for
post-interaction events. Also I thought that events with
Platform.runLater() will be processed first-in-first-out, but it seems that
this is not the case.
Yet, another problem is, that I did not manage to *(3) retrieve screenshot
images in headless mode* with the Glass robot. Although it works in normal
mode. Maybe the JavaFX event robot can retrieve the screenshots.
Interestingly the HeadlessScreen updates it's framebuffer (
https://github.com/TestFX/Monocle/blob/0ab3986f4c/src/main/java/com/sun/glass/ui/monocle/headless/HeadlessScreen.java#L117
).
Regards,
Benjamin
On Fri, Nov 14, 2014 at 8:04 PM, Benjamin Gudehus <hastebrot at gmail.com>
wrote:
> >Should we roll out a openjfx-monocle-1.8.0_40-SNAPSHOT?
>
> I'll prepare a branch for this.
>
> Applied your patch and made some changes (introduced gradle.properties and
> removed redundant if-condition):
>
> https://github.com/TestFX/Monocle/pull/2/files
>
> --Benjamin
>
More information about the openjfx-dev
mailing list