Well, unit tests for the glass robot are finished and the integration
tests pass now. This PR will be pulled into master very soon. :)

https://github.com/TestFX/TestFX/pull/159#commits-pushed-11b9b64

Headless mode in TestFX will be behind the properties:
-Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw

I decided to keep the AWT robot as default, for compability and
because the Node.startDragAndDrop() issue is not resolved.

@Neil:
>Does that explain what you have seen?
I'm not quite sure. Thanks for the hint. I'll need to investigate this futher.


On 11/17/14, ngalarn...@abinitio.com <ngalarn...@abinitio.com> wrote:
> Hi Benjamin,
>
> Your progress sounds very good!
>
> In your email below, you said: "Also I thought that events with
> Platform.runLater() will be processed first-in-first-out, but it seems
> that this is not the case."
>
> Kevin, on an email on Nov. 5th to this list, said that the only exception
> to Platform.runLater() Runnables being processed in order was in the case
> of a showAndWait() being done. That blocks the current thread, which stops
> the current Runnable from completing while a new thread takes the next
> event/Runnable from the queue. In that case later Runnables would be
> processed before the earlier one completes.
>
> Does that explain what you have seen?
>
>
> Neil
>
>
>
>
> From:   Benjamin Gudehus <hasteb...@gmail.com>
> To:     ngalarn...@abinitio.com,
> Cc:     Tom Eugelink <t...@tbee.org>, "openjfx-dev@openjdk.java.net"
> <openjfx-dev@openjdk.java.net>
> Date:   11/15/2014 10:50 AM
> Subject:        Re: Monocle in 8u25
>
>
>
> Small update:
>
> Regarding (2) "requires interactions to be run withing the JavaFX thread":
> Nearly all integration tests for TestFX pass now. However the interactions
> freeze when using Glass robot, Node.startDragAndDrop() and
> ClipboardContent.putString() together. I guess the timing with
> Platform.runLater() needs some work.
>
> Regarding (3) "retrieve screenshot images in headless mode": I forgot to
> use "-Dprism.order=sw". Screenshots work in headless mode.
>
> --Benjamin
>
> On Sat, Nov 15, 2014 at 1:48 AM, Benjamin Gudehus <hasteb...@gmail.com>
> wrote:
> 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
>
>
>
>
>
>
> NOTICE from Ab Initio: This email (including any attachments) may contain
> information that is subject to confidentiality obligations or is legally
> privileged, and sender does not waive confidentiality or privilege. If
> received in error, please notify the sender, delete this email, and make
> no further use, disclosure, or distribution.

Reply via email to