Jump to content

automatic click button


Recommended Posts

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

Link to comment
Share on other sites

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

 

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

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