Function Reference

_IETagNameAllGetCollection

Returns a collection object all elements in the document or document hierarchy in source order.

#include <IE.au3>
_IETagNameAllGetCollection ( ByRef $o_object [, $i_index = -1] )

 

Parameters

$o_object Object variable of an InternetExplorer.Application, Window, Frame, iFrame or any object in the DOM
$i_index Optional: specifies whether to return a collection or indexed instance
0 or positive integer returns an indexed instance
-1 = (Default) returns a collection

 

Return Value

Success: Returns an object variable containing the Tag collection, @EXTENDED = Tag count
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
3 ($_IEStatus_InvalidDataType) = Invalid Data Type
4 ($_IEStatus_InvalidObjectType) = Invalid Object Type
5 ($_IEStatus_InvalidValue) = Invalid Value
7 ($_IEStatus_NoMatch) = No Match
@Extended: Contains invalid parameter number

 

Remarks

The DOM is hierarchical, so if the object passed is the document object, all elements in the document are returned. If the object passed in is an object inside the document (e.g. a TABLE object), then only the elements inside that object are returned.

 

Related

_IETagNameGetCollection

 

Example


; *******************************************************
; Example 1 - Open a browser with the basic example, get the collection
;               of all elements and display the tagname and innerText of each
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("basic")
$oElements = _IETagNameAllGetCollection ($oIE)
For $oElement In $oElements
    MsgBox(0, "Element Info", "Tagname: " & $oElement.tagname & @CR & "innerText: " & $oElement.innerText)
Next