Jump to content

Can't set value and submit on IE page


Recommended Posts

This works...

#include <IE.au3>
$sURL = "https://ike.mantech.com/niku/app?action=npt.overview"
$sLogin = "test1"
$sPassword = "test2"

; Creation de l'instance IE dans la variable Objet $oIE
$oIE = _IECreate()

; Acces à Clarity
_IENavigate($oIE, $sURL)
_IELoadWait($oIE)

; Récupération des objets à remplir
$oFormLogin = _IEFormGetObjByName($oIE, "security.login")
$oLogin = _IEFormElementGetObjByName($oFormLogin, "userName")
$oPassword = _IEFormElementGetObjByName($oFormLogin, "passWord")

; Remplissage du login et mot de passe
_IEFormElementSetValue($oLogin, $sLogin)
_IEFormElementSetValue($oPassword, $sPassword)

Sleep(3000) ; to make sure

; Envoi de la commande submit
$oButton = _IEFormElementGetObjByName($oFormLogin, "submit")
_IEAction ( $oButton, "click" )


Exit

8)

NEWHeader1.png

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