Jump to content

web login confirmation


Recommended Posts

Func _AccessAdmin()
    $oIE = _IECreate("http://127.0.0.1")
    $oForm = _IEFormGetCollection($oIE, 0)
    $oUserField = _IEFormElementGetCollection($oForm, 0)
    $oPassField = _IEFormElementGetCollection($oForm, 1)
    _IEFormElementSetValue($oUserField, "Username")
    _IEFormElementSetValue($oPassField, "Password")
    $LoginCheck = _IEFormSubmit($oForm)
    If $LoginCheck = -1 Then
        _IENavigate($oIE, "https://127.0.0.1/admin.htm")
    Else
        _IEQuit($oIE)
    EndIf
EndFunc   ;==>_AccessAdmin

What i want to check is if it successfully login, for instance if the password is wrong it would not login but it seems that the IEFormSubmit still returns -1(success) when the password or username is wrong.

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...