Sign in to follow this  
Followers 0
tritina

Click on button by class

7 posts in this topic

Hi,

I want to click on a button but it doesn't have an id or a name :

<div class="Buttons">
        <button class="Button Button18 RedButton" data-text-pin-it="Pin It" data-text-pinning="Pinning…" type="button">Pin It</button>
    </div>

Can you please help me with that ?

Share this post


Link to post
Share on other sites



my signature allows xpath object retrieval...all matching objects will be returned in an array


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Thank you all, but it still doesn't work : /

I have iE 8 do I need IE 9 to use this code :

$oButtons = _IETagNameGetCollection ($oIE, "INPUT") ; not sure about input
For $oButton In $oButtons
If $oButton.class = "Button Button18 RedButton" Then
_IEAction ($oButton, "click")
ExitLoop
EndIf
Next

??

Because all the codes like this one doesn't work for me : s

Thank you again

Share this post


Link to post
Share on other sites

You dont need to get other version. Maybe my code is wrong. What error you get? Or maybe you could send me link of webpage?

Share this post


Link to post
Share on other sites

It's okay I solved the thing by using imgclick ^^ thx

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  
Followers 0