acha114 Posted August 13, 2008 Share Posted August 13, 2008 (edited) I'm trying to submit some details automatically in AutoIt. Basically I fill in a field and click on a button which is represented in HTML as an anchor with the following HTML <A class=menulink HREF="java script: quicktask_onsubmit();"><B>Go</B>.</A> Does anyone have any ideas how to simulate a mouse click on this anchor? I tried the following $oTags = _IETagNameGetCollection ($o_mainPageRightFrame, "a") For $oTag In $oTags $oGo = $oTag.getAttributeNode("HREF") If StringInStr($oGo.value, "quicktask_onsubmit()") Then ExitLoop EndIf Next _IEAction ($oGo, "click") But I get an AutoIt Error Line 2795 (File "C:\Program Files\AutoIt3\Include\IE.au3") $o_object.Click() $o_object.Click()^ERROR Error: The requested action with this object has failed. Thanks in advance. Edited August 13, 2008 by acha114 Link to comment Share on other sites More sharing options...
acha114 Posted August 13, 2008 Author Share Posted August 13, 2008 Apparently you cant do _IEAction on an anchor, it must be an Internet Explorer object. I have worked around this by using _IELinkClickByIndex, by passing the value of the index that the link corresponds to (just a hardcoded value) and it works now Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now