Jump to content

Automate webpage log in [IE.au3]

Recommended Posts


I am trying to automate log in to my bank "ING" but I am afraid some javascript block to do it on the DOM object. I want go to the next page (the password section) but without ControlSend function. Any idea?

#include <IE.au3>
#include <Array.au3>

$oIE = _IECreate()
Local $hIE = _IEPropertyGet($oIE, "hwnd")
_IENavigate($oIE, "https://login.ingbank.pl/mojeing/app/#login")
msgbox(0,0,"press me when page is fully loaded")
Local $oLogin = _IEGetObjById($oIE, "login-input")

    ;this piece of code will do the job but I want do it without ControlSend() function
    ;_IEAction($oLogin, "focus")
    ;ControlSend($hIE, "", "", "test{ENTER}")

$oLogin.value = "test"

;find <button> tag with "Dalej" value and click on it
$oSpans = _IETagNameGetCollection($oIE, "button")
for $oSpan in $oSpans
    if StringInStr($oSpan.innerHTML, "Dalej") then
        msgbox(0,0,"i am going to click on the button 'Dalej'") ;no result on the webpage
        _IEAction($oSpan, "click")
        if @error then msgbox(0,0,"click error")

msgbox(0,0,"i am going to submit form on the webpage...")
Local $oButton = _IEGetObjById($oIE, "js-login-form")
_IEFormSubmit($oButton) ;receive HTTP 405 error


Share this post

Link to post
Share on other sites

are you sure this is even a good thing to do?

Share this post

Link to post
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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.