Wednesday, 11 September 2013

Get the locator of the element upon which mouse is hovered/clicked

Get the locator of the element upon which mouse is hovered/clicked

I want to know a way of extracting id/locator of the element in the dom on
which mouse is hovered/clicked. I want to capture this in my code.
Ex:
Consider a web page which has a button with id=saveButton.
I will be running the deamon code at the back end.
When a user clicks the button, I want my code to capture the mouse event
which is click and locator which is @saveButton.
Please let me know how to do this. Code in jave would be helpful.
Thanks in advance.

No comments:

Post a Comment