Jump to content
Sign in to follow this  
faustf

automatic click button

Recommended Posts

faustf

hi  guy

i  have  this  site 

https://www.kijiji.it/miei-annunci/accedi

i  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
            Next

some one  can help me ?? thanks

Share this post


Link to post
Share on other sites
Chimp

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

 

  • Like 1

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites
faustf

o thankz  goo good  :D

 

Share this post


Link to post
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
Sign in to follow this  

×