 | Work in Progress
This example is still being worked on, if you have any comments please add them to the page. |
This example uses the getBoundingClientRect method and AutoIt to effectively achieve a right click on an element. In this example, I added a method to the Element class in Watir (originally provided by Paul Rogers here
) and then use AutoIt's MouseClick method to send the right click. Subsequent to that you can use the Send method to navigate the context menu. In my example, I want to do a "Save Target As" in order to save the source of a link I want to follow (in my case it was a huge XML file).
UPDATE:
With some help from Bill Agee (see this thread
- thanks Bill!), we have come across a workable solution which you see below. I have done some limited testing on this and it seems to work but YMMV. This method has some better recognition for where the element is in relation to the IE page (which was tripping me up before). If you have any feedback on this please leave a comment on this page.
Kept getting this error
"initialize': unknown OLE server: `AutoItX3.Control' (WIN32OLERuntimeError)
HRESULT error code:0x800401f3
Invalid class string"
I guess its bcos of this
Is there a work around to this? Or am i doin it all wrong?
Pls Advice