I'm having an issue with the mouseMove function. I have a swing app that embeds a 3D-World map within it. I have named this single map component as "WorldMap3D" and the WindowTester tool was able to locate this component once the test runs. However, when I try moving the mouse to different coordinates on this map component by doing this in test code:
- Code: Select all
for (int k = 1; k<10; k++) {
ui.click(new NamedWidgetLocator("Go")); // "Go" is a name of a JButton that lives outside the map component.
ui.mouseMove(new XYLocator(new NamedWidgetLocator("WorldMap3D"), k, k));
ui.wait(TimeElapsedCondition.milliseconds(1000));
}
The mouse seems to move back and forth between the button and the same point on the map although each time looping the coordinates are changing. Is there a way to simulate a mouse move from one point to another within the same component (my 3D-World map in this case)?