Regarding the customized component, as the test runs the tool is able locate my 3D map component. So I am able to simulate some simply actions such as a single mouse click on a map by doing this:
- Code: Select all
IUIContext ui = getUI();
ui.click(new NamedWidgetLocator("World3DMap"); // I have named my customized component as "World3DMap"
I even tries clicking on different coordinates of the map by doing this:
- Code: Select all
IUIContext ui = getUI();
ui.click(new XYLocator(new NamedWidgetLocator("World3DMap"), 120, 320));
ui.click(new XYLocator(new NamedWidgetLocator("World3DMap"), 100, 100));
ui.click(new XYLocator(new NamedWidgetLocator("World3DMap"), 240, 520));
However as the test runs, it appears to me that the location of the mouse at the time the click action takes place is FIXED although I've specifically chosen different locations. Here is the sequence I observe during testing:
1. The mouse first moves to the same location on the map. This location is UNKNOWN and I speculate it's been recorded somehow by the tool.
2. The click operation takes place.
3. The mouse shows up at the new location. I believe this new location matches with the coordinates I've specified in the test code.
I was wondering if anyone might know how to simulate a mouse click action at an xy location relative to the found widget (the map in this case)?
Best regards,
-keico
p.s I also observed that other mouse actions such as double click and drag behave the same way.