3

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?

2

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

String xCoordinate = selenium.getElementPositionLeft("elementLocator");
String yCoordinate = selenium.getElementPositionTop("elementLocator");
| 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
-2

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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