faustf Posted June 3, 2015 Posted June 3, 2015 hi guyi have this site https://www.kijiji.it/miei-annunci/accedii want click button accedi but not have id or name how is possible to clic?? i tryed to use this code but not clic Local $oBtns = _IELinkGetCollection($oIE) For $oBtn In $oBtns $classname = String($oBtn.classname()) ConsoleWrite($classname & @CRLF) If $classname = "btn btn-secondary shadow submit" Then ConsoleWrite("Found it" & @CRLF) _IEAction($oBtn,"Focus") _IEAction($oBtn,"Click") ;ConsoleWrite("ie click return=[" & $b & "]." & @CRLF) ExitLoop EndIf Nextsome one can help me ?? thanks
Gianni Posted June 3, 2015 Posted June 3, 2015 Try this:#include <ie.au3> Local $oIE = _IECreate("https://www.kijiji.it/miei-annunci/accedi") Local $oForm = _IEFormGetCollection($oIE, 0) ; first form in page Local $oFormElement = _IEFormElementGetCollection($oForm, 3) ; element 3 is the submit button _IEAction($oFormElement, "Click") ; perform the click faustf 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Danp2 Posted June 3, 2015 Posted June 3, 2015 Another option:#include <ie.au3> Local $oIE = _IECreate("https://www.kijiji.it/miei-annunci/accedi") Local $oForm = _IEFormGetCollection($oIE, 0) ; first form in page _IEFormSubmit($oForm) faustf 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
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