in reply to Re^5: Is it possible to trigger a mouse click action in a browser using Perl?
in thread Is it possible to trigger a mouse click action in a browser using Perl?

That is hysterical. If you go strictly by the RFC, you would use dispatchEvent, but since you are using Microsoft Windows OLE Automation use
$obj->fireEvent("onclick");
  • Comment on Re^6: Is it possible to trigger a mouse click action in a browser using Perl?
  • Download Code

Replies are listed 'Best First'.
Re^7: Is it possible to trigger a mouse click action in a browser using Perl?
by james2vegas (Chaplain) on Aug 14, 2009 at 12:38 UTC
    Yes, Microsoft is not known for following standards. The OP indeed can use the click method to browse to those links as Microsoft extends the functionality of click() to other, non-INPUT elements. I have to concede that I foolishly thought Microsoft would follow the standards their own documentation links to.

    fireEvent is a method in Microsoft's DOM, not something specific to OLE Automation, and from what I can tell it doesn't perform the default action of the event on the element (in the case of AnchorElement->onclick, browsing to href), just any custom event handlers attached to event on that element. So if the OP's page had a:hrefs like 'javascript:.*' instead of onclick handlers, using fireEvent would not work for them.
      Thanks everyone, I have got the pages required through get(javascript:code). But the click() dint work. Anyways..
      Thanks again.
      Eshwar.
        But the click() dint work.

        You can't call click on ANY object and expect it to work.