• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i move the mouse over a html element within web browser?  RSS feed

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am writing a functional test automation script to automate the file upload feature of a web application. I am using a tool called selenium to operate on the browser. This tool however does not support clicking on the file upload control hence I want to do this operation using java robot.

First I need to move the mouse pointer onto the html element (file upload control) displayed within a html page. I believe to do that i need to get the coordinates of the html element. I tried with the offsetLeft and offsetTop but those are just the relative coordinates (relative to the html document). I need the absolute screen coordinates. Is there a way to get the absolute screen coordinates? If not can you suggest a different approach?

Thanks for reading
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!