Take the 2-minute tour ×

I want to use the Selenium method mouseMoveAt(java.lang.String locator,java.lang.String coordString). How do I set coordString?

For example, if coordString is the x,y position (10,20), what does that mean?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You could use following to get element position run time and use them

String xCoordinate = selenium.getElementPositionLeft("elementLocator");
String yCoordinate = selenium.getElementPositionTop("elementLocator");
share|improve this answer
Thanks Tarun , So In this case if I have to move my mouse at particular position i need to store the x,y values in string and then use mouseMoveAt() similar for clickAt() method etc... –  smriti Jun 24 '11 at 12:23
yup you should try that –  Tarun Jun 25 '11 at 1:53
Thanks again... –  smriti Jun 26 '11 at 12:29
add comment

The above answer is not a possible solution because selenium.getElementPositionLeft("elementLocator"); returns a number and not a string and not just that it also gives an error which says that we cannot make static reference to non static methods.

share|improve this answer
add comment

Your Answer


