Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.