# Hooking IE events in Watir

**URL:** <https://www.ruby-forum.com/t/hooking-ie-events-in-watir/74242>\
**Category:** Ruby\
**Created:** [November 2, 2006, 2:52pm UTC](https://www.ruby-forum.com/t/hooking-ie-events-in-watir/74242 "2006-11-02T14:52:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [November 2, 2006, 2:52pm UTC](https://www.ruby-forum.com/t/hooking-ie-events-in-watir/74242/1 "2006-11-02T14:52:41Z")

</div>

I need to handle the onMouseDown event for the IE controller in Watir.  
Has anyone done anything like this before. Using watirMaker.rb as a  
starting point, I’m able to wire-up the event by “talking” directly to  
the OLE object, but I’d rather go thru the Watir module and use the  
IE.getIE() property.

Thanks!

---

<div class="post-metadata">

**Author:** ![pkspence](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Post date:** [November 2, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/hooking-ie-events-in-watir/74242/2 "2006-11-02T15:13:38Z")

</div>

Patrick S. wrote:

> I need to handle the onMouseDown event for the IE controller in Watir.  
> Has anyone done anything like this before. Using watirMaker.rb as a  
> starting point, I’m able to wire-up the event by “talking” directly to  
> the OLE object, but I’d rather go thru the Watir module and use the  
> IE.getIE() property.
> 
> Thanks!

I’m working with something similar trying to get a mouse drag to work, I  
can certainly grab the object - a good example of doing this is here:

[http://zbarzone.blogspot.com/2006/05/drag-and-drop-with-watir.html](http://zbarzone.blogspot.com/2006/05/drag-and-drop-with-watir.html)
