Jump to content

Click in hyperlink into website


Recommended Posts

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&amp;Option=Registration">EUFAPROCESS</a>

Link to comment
Share on other sites

#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

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

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&amp;Option=Registration">EUFAPROCESS</a>

in the beggening of the html code it says " <script type="text/javascript">
 

Edited by titi9030
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...