Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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 2

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

 
discard

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.