faustf Posted April 11, 2016 Share Posted April 11, 2016 hi guy i try to click a button entra in this site https://www.esprinet.com/public/index.asp i use this script but i dont know why not work , someone can help me??? thankz expandcollapse popupFunc _entra_dentro() ConsoleWrite('@@ (1116) :(' & @MIN & ':' & @SEC & ') _entra_dentro()' & @CR) ;### Function Trace Global $oIE = _IECreate("https://www.esprinet.com/public/index.asp", 0, 1, 1, 1) Local $oForm = _IEGetObjById($oIE, "moduloLogin") Local $username = _IEFormElementGetObjByName($oForm, "utente") _IEFormElementSetValue($username, "xxxxxxxx") Local $pass = _IEFormElementGetObjByName($oForm, "pwd") _IEFormElementSetValue($pass, "xxxxxxx") Local $bottone = _IEFormGetObjByName($oForm, "bottone") _IEAction($bottone, "Focus") _IEAction($bottone, "Click") _IELoadWait($oIE) #cs Local $oBtns = _IELinkGetCollection($oIE) For $oBtn In $oBtns $classname = String($oBtn.classname()) If $classname = "bottone" Then _IEAction($oBtn, "Focus") _IEAction($oBtn, "Click") _IELoadWait($oIE) EndIf Next #ce ;_IEFormSubmit($oForm, 0) ;_IELoadWait($oIE) _IEImgClick($oIE, "Entra nel sito", "alt") ;_IELoadWait($oIE) _IENavigate($oIE, "http://it.esprinet.com/Area_Operativa/DServizi_jolly_Speciale_BID.asp", 1) _IELoadWait($oIE) _IEImgClick($oIE, "btn-Fantaricerca.png", "src") ;_IELoadWait($oIE) EndFunc ;==>_entra_dentro Link to comment Share on other sites More sharing options...
MichaelHB Posted April 12, 2016 Share Posted April 12, 2016 @faustf DIV ≠ FORM _IEFormGetObjByName is to get the FORM not the "button" (bottone). An "bottone" is the element class not its name. #include <IE.au3> Global $oIE = _IECreate("https://www.esprinet.com/public/index.asp", 0, 1, 1, 1) Local $oForm = _IEFormGetObjByName($oIE, "areaRis") Local $username = _IEFormElementGetObjByName($oForm, "utente") _IEFormElementSetValue($username, "xxxxxxxx") Local $pass = _IEFormElementGetObjByName($oForm, "pwd") _IEFormElementSetValue($pass, "xxxxxxx") Local $bottone = _IEFormElementGetObjByName($oForm, "Submit") _IEAction($bottone, "Click") _IELoadWait($oIE) Link to comment Share on other sites More sharing options...
faustf Posted April 14, 2016 Author Share Posted April 14, 2016 thankz 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