faustf Posted March 4, 2015 Share Posted March 4, 2015 hi guy i have a web page with user and login (form) i can insert user and password , but button i dont know how click it some one can help me thankz so much this is a site http://www.icintracom.biz/ this is a part of button <div class="form-item"> <a class="forgot-password" href="http://www.icintracom.biz/customer/account/forgotpassword/">Password dimenticata?</a> <!-- <input class="button" type="submit" name="" value="Accedi"/>--> <input type="submit" style="font-size:13px;" class="button" value="Accedi"> <!-- <a class="button">Accedi</a>--> <div class="clear"></div> </div> i tryed to use this code for click, but not go Local $oBtns = _IELinkGetCollection($oIE) For $oBtn In $oBtns $classname = String($oBtn.classname()) ConsoleWrite($classname & @CRLF) If $classname = "button" Then ;MsgBox(0, 'menubar', $classname) ;ConsoleWrite("Found it" & @CRLF) _IEAction($oBtn,"Focus") $b = _IEAction($oBtn,"Click") ;ConsoleWrite("ie click return=[" & $b & "]." & @CRLF) ExitLoop EndIf Next ;MsgBox(0, '', 'errore ') Link to comment Share on other sites More sharing options...
fbar Posted March 8, 2015 Share Posted March 8, 2015 ;auther robert leniewski ;facebook affiliated robot #include <IE.au3> ;.fo ; Create a browser window and navigate to facebook $oIE = _IECreate() $oIEN =_IENavigate($oIE, "https://www.facebook.com") _IELoadWait($oIEN) ; get pointers to the login form and username and password fields $o_form = _IEFormGetObjByName($oIE, "login_form") $o_login = _IEFormElementGetObjByName($o_form,"email") $o_password = _IEFormElementGetObjByName($o_form, "pass") ; Set field values and submit the form _IEFormElementSetValue($o_login, "login") _IEFormElementSetValue($o_password, "password") ;submit the form _IEFormSubmit($o_form) $killie = _IEQuit($oIE) sleep(250) $oIE = _IECreate() $oIEN =_IENavigate($oIE, "https://www.facebook.com") _IEAction() Exit i hopt this help you 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