Novox Posted June 15, 2010 Share Posted June 15, 2010 Hello, I would like to know any function in IE.au3 or others can list all website controls (textbox, dropdownlist, checkbox, radio button, button, etc.) in the page with their name/id and value? Thank you very much, Novox Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted June 15, 2010 Share Posted June 15, 2010 Not that I recall, but the way to do that would be to get all the forms, get all elements under each form and from then on you could get all the properties of each of them, it would just really take about 2 loops. Link to comment Share on other sites More sharing options...
Novox Posted June 15, 2010 Author Share Posted June 15, 2010 Not that I recall, but the way to do that would be to get all the forms, get all elements under each form and from then on you could get all the properties of each of them, it would just really take about 2 loops.Would you please give me a hint which command I can use to get all the forms and get all elements?Thanks again! Link to comment Share on other sites More sharing options...
Remnant Posted June 15, 2010 Share Posted June 15, 2010 _IEFormGetCollection returns a collection of all forms in an IE window _IEFormElementGetCollection returns a collection of all elements in a form. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted June 15, 2010 Share Posted June 15, 2010 #include <IE.au3> $oie = _IECreate('http://www.google.com') Sleep(100) $oforms = _IEFormGetCollection($oie,-1) For $oform In $oforms ConsoleWrite($oform.name & @CRLF); $oeles = _IEFormElementGetCollection($oform) For $oele In $oeles ConsoleWrite(@TAB & 'Name: ' & $oele.name & ' Tag Type: ' & $oele.tagName &@CRLF) Next Next A small demonstration Link to comment Share on other sites More sharing options...
Novox Posted June 15, 2010 Author Share Posted June 15, 2010 Thank you very much for your quickly reply 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