Description
- Get parent object reference. In the example given, it’s a browser process, but you can narrow it down to a page or a web container object (table, div, etc.).
- Use FindAllChildren to retrieve array of links.
– You can limit search depth according to your context.
– You may want to do filtered search using additional properties: Visible, VisibleOnScreen, ContentText, etc.
Implementation
Dim PropNames, PropValues, IEProcess
Dim Links
PropNames = Array("processname", "index")
PropValues = Array("iexplore", 1)
Set IEProcess = Sys.FindChild(PropNames, PropValues, 1, True)
PropNames = Array("ObjectType")
PropValues = Array("Link")
Links = IEProcess.FindAllChildren(PropNames, PropValues, 100, True)
PropNames = Array("ObjectType", "Visible")
PropValues = Array("Link", True)
Links = IEProcess.FindAllChildren(PropNames, PropValues, 100, True)