Get current mouse position

Asked by Peter Bassett

I'm developing test automation with Java.
I have 2 grids (tables) with the same column names and I need to test sorting a column by clicking just above a cell in that column.
Therefore I can't simply click a column (e.g. Step) because there are 2 identical images of Step.
I can tab into the cell OK (each grid is named with an image label, so I can click that image and tab x times to get to the cell) but I can't figure out how to click above it because I can't get the cursor location in the cell.
I see that Env.getMouseLocation() is deprecated, but documentation says Mouse.at() should work.
Unfortunately it's telling me the method at() undefined.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

You mean that you want to get location of (keyboad) cursor?
Even you can get the current location of mouse cursor, you can not click column label without getting the location of column label.

You should get the location of column label that you want to click by find feature, and then click there.

Can you help with this problem?

Provide an answer of your own, or ask Peter Bassett for more information if necessary.

To post a message you must log in.