Jump to content

anks

Active Members
  • Posts

    26
  • Joined

  • Last visited

Reputation Activity

  1. Like
    anks reacted to MrMitchell in Can _IELinkGetCollection return links for particular tags?   
    Here's an example of how you could possibly approach it, seems to work for me if I'm properly understanding what you are trying to do:


    #include <IE.au3> Local $oIE = _IECreate("http://www.w3.org/QA/Tips/unordered-lists") ;Get collection of elements tagged "LI" for List Item $oListItems = _IETagNameGetCollection ($oIE, "LI") For $oListItem In $oListItems ConsoleWrite("LI (text): " & $oListItem.innerText & @CRLF) ;Get all the elements tagged "a" for Anchor ;This needs an error handler in case the list item ; doesn't have any anchors $oAnchors = $oListItem.getElementsByTagName("a") For $oAnchor In $oAnchors ;Get the href of each anchor $sHref = $oAnchor.href ConsoleWrite(" Link Info: " & $sHref & @CRLF) Next Next
×
×
  • Create New...