titi9030 Posted April 1, 2017 Share Posted April 1, 2017 Hi, I need to click the following hyperlink in a webstie, I already get into, but IEFormSubmit did not work, which one can I use to work with this kind of button and click it <a id="dgd2345589_ctl02_Hyperlink2" href="./CHVP/ComplaintProcess.aspx?module=2&Option=Registration">EUFAPROCESS</a> Link to comment Share on other sites More sharing options...
Subz Posted April 1, 2017 Share Posted April 1, 2017 Have a look at the function: _IEGetObjById and _IEAction For example: #include <IE.au3> Local $oIE = _IE_Example("http://www.yoururlhere.com") Local $oLink = _IEGetObjById($oIE, "dgd2345589_ctl02_Hyperlink2") _IEAction($oLink, "click") Link to comment Share on other sites More sharing options...
titi9030 Posted April 1, 2017 Author Share Posted April 1, 2017 #include <IE.au3> Local $oIE = _IECreate("https://gccass.drs.com/") $HWND = _IEPropertyGet($oIE, "hwnd") WinSetState($HWND, "", @SW_MAXIMIZE) Local $oLink = _IEGetObjById($oIE,"dgd2345589_ctl02_Hyperlink2") _IEAction($oLink, "click") it shows me a message: IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (dgd22345589_ctl02_Hyperlink2) --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType Link to comment Share on other sites More sharing options...
Subz Posted April 1, 2017 Share Posted April 1, 2017 Can you try this then: #include <IE.au3> Local $oIE = _IECreate("https://gccass.drs.com/") $HWND = _IEPropertyGet($oIE, "hwnd") WinSetState($HWND, "", @SW_MAXIMIZE) Local $oLinks = _IELinkGetCollection($oIE) For $oLink in $oLinks ConsoleWrite($oLink.id & @CRLF) If $oLink.id = "dgd2345589_ctl02_Hyperlink2" Then _IEAction($oLink, "click") ExitLoop EndIf Next If you run it in Scite it should show you all the id of each link until it finds your link. Link to comment Share on other sites More sharing options...
titi9030 Posted April 2, 2017 Author Share Posted April 2, 2017 (edited) HI, thanks for your support I tried but it showed me the following message: /ErrorStdOut "C:\Users\cpivbalers\Music\FILE\PPM.au3" >Exit code: 0 Time: 3.782 I am not sure whats wrong as per I use the same code in different website for a link and it run perfectly <a id="dgd2345589_ctl02_Hyperlink2" href="./CHVP/ComplaintProcess.aspx?module=2&Option=Registration">EUFAPROCESS</a> in the beggening of the html code it says " <script type="text/javascript"> Edited April 2, 2017 by titi9030 Link to comment Share on other sites More sharing options...
Subz Posted April 2, 2017 Share Posted April 2, 2017 Not sure how PPM.au3 is related to the code I posted above, did you try the code by itself without any additional includes? 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