Jump to content

Any function in IE.au3 to list all web controls?


Recommended Posts

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

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

#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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...