tritina Posted July 2, 2012 Share Posted July 2, 2012 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 ? Link to comment Share on other sites More sharing options...
Zedna Posted July 2, 2012 Share Posted July 2, 2012 Maybe _IETagNameGetCollection() can help you. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
EmptySpace Posted July 2, 2012 Share Posted July 2, 2012 Maybe something like this? $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 Link to comment Share on other sites More sharing options...
jdelaney Posted July 2, 2012 Share Posted July 2, 2012 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. Link to comment Share on other sites More sharing options...
tritina Posted July 2, 2012 Author Share Posted July 2, 2012 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 Link to comment Share on other sites More sharing options...
EmptySpace Posted July 3, 2012 Share Posted July 3, 2012 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? Link to comment Share on other sites More sharing options...
tritina Posted July 4, 2012 Author Share Posted July 4, 2012 It's okay I solved the thing by using imgclick ^^ thx Link to comment Share on other sites More sharing options...
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