SmartBear/TestFX — pull request #35 by Philipp91 (2014-01-08 12:24:46+00:00)
Title: Faster mouse movement over long distances

Please also see my comments here: https://github.com/SmartBear/TestFX/commit/e040ecb24e59667d8a1ae3d00341aaf4cd0ed288

The code below improves speed:
- On long distances, the total movement time is limited to 175ms (just like the keyframe approach) whereas the previous implementation could take up to 1,9 seconds (on my screen).
- On short distances, the time can be slower by a factor of sqrt(2), which is on purpose, looks more realistic.
- I removed the properties. So the following test would fail, if it existed:
- This implementation does not react to interfering mouse movements by the user or other software and simply continues its path - just like the old keyframe-based version did.

move(1.1, 2.6);
assertThat(getMouse(), is(new Point(1.1, 2.6));

Instead, the mouse would be at 1;3, but that's what users might expect anyway.