Jump to content
Sign in to follow this  
Arclite86

Please help me,Get object by class

Recommended Posts

Arclite86

Hi 

I just start using autoit 2 days ago, and i am starting to understand this software 

everything went fine until have to push a butten, i know how to get a objectbyname and a objectbyid

but this is the only info about this button that i have to click:

<button type="submit" class="submit btn primary-btn flex-table-btn js-submit">
            Inloggen
          </button>
 
there is no name and no id, so i think i have to get this object by class.
I have read allot about getting a objectbyclass but i still dont understand it, the explanations are too hard for me to understand probalely because im a beginner, i know the solution has something to do with  _IETagNameGetCollection or _IETagNameAllGetCollection but as i read the desciption in Help i dont understand I either,
 
Can somebody type the code so I locate  this button with autoit 3 so I click it  with _IEAction($?????, "click")
 
please help me to get further
Edited by Arclite86

Share this post


Link to post
Share on other sites
Arclite86

 

Maybe there is a simpler way but you provided too little code ... :unsure:

Local $oButs = _IETagNameGetCollection($oIE, "button")
For $oBut In $oButs
    If $oBut.type == "submit" Then _IEAction($oBut, "click")
Next

Thank you so much, it worked, i was looking for this solution for a few days, Thanks!

Share this post


Link to post
Share on other sites
Arclite86

Ok now I have learned to detect a button by the "type" but what if there are two buttons with the same type, now i have to push a button:

<button type="submit" class="submit btn primary-btn flex-table-btn js-submit">
            Inloggen
          </button>
 
 
and uncheck
 
 
<input type="checkbox" value="1" name="remember_me">      
 
can somebody give me the solution for this, so i can push these buttons too,
 
Thanks,
Edited by Arclite86

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.