this only gets the first of the elements, though the backend cgi (such as php) can get all these in an array.
$surl=some url
$ie = new-object -com "InternetExplorer.Application"
$ie.visible = $true
$ie.navigate($surl)
$doc = $ie.Document
$element = $doc.getElementByID("some_name[]")
this only gets the first of the elements with the same name.
i am trying to fill values with a script but so far have not figured out a way to go beyond the first of these elements. i do not control the document rendering so cannot change how these are named.
thanks for any ideas!
An HTML ID has to be unique! So that’s why you only get one.
From: http://www.w3schools.com/tags/att_standard_id.asp
Per the getElementById documentation:
Use getElementsByClassName or getElementsByName or getElementsByTagName instead.