LHCompter Posted August 26, 2018 Share Posted August 26, 2018 Hi,is there any way to get a button from a webpage by classname not just id or name ? ex : _IEGetObjByClassName Or anything like that ? Link to comment Share on other sites More sharing options...
Subz Posted August 26, 2018 Share Posted August 26, 2018 Just use something like: Local $oIE = _IECreate("http://www.sitename.com") Sleep(5000) Local $oInputs = _IETagNameGetCollection($oIE, "input") If IsObj($oInputs) Then For $oInput In $oInputs If $oInput.ClassName = "ClassName" Then _IEAction($oInput, "click") ExitLoop EndIf Next EndIf LHCompter 1 Link to comment Share on other sites More sharing options...
Gianni Posted August 26, 2018 Share Posted August 26, 2018 also.... https://www.autoitscript.com/forum/topic/177201-_iegetobjbyclassname/ LHCompter 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
LHCompter Posted August 26, 2018 Author Share Posted August 26, 2018 10 hours ago, Subz said: Just use something like: Local $oIE = _IECreate("http://www.sitename.com") Sleep(5000) Local $oInputs = _IETagNameGetCollection($oIE, "input") If IsObj($oInputs) Then For $oInput In $oInputs If $oInput.ClassName = "ClassName" Then _IEAction($oInput, "click") ExitLoop EndIf Next EndIf Thanks bro,it's great example 5 hours ago, Chimp said: also.... https://www.autoitscript.com/forum/topic/177201-_iegetobjbyclassname/ Thanks,it's a great post they got much more explanation 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