Jump to content

Getting info on nested frames and framesets?


Recommended Posts

Does anyone know how to get this code to get info on nested iframes? Basically iFrames within iFrames and framesets?

Func _TestForFrames()
    _DebugSetup("Frames Check")

    Local $URL = $MainURL
    Local $oIE = _IECreate($URL, 1, 1, 1, 1)
    Local $oFrames = _IEFrameGetCollection($oIE)
    Local $iNumFrames = @extended
    For $i = 0 To ($iNumFrames - 1)
        Local $oFrame = _IEFrameGetCollection($oIE, $i)
        MsgBox(0, "Frame Info", _IEPropertyGet($oFrame, "locationurl"))
        _DebugOut(_IEPropertyGet($oFrame, "locationurl"))

    Next

EndFunc   ;==>_TestForFrames

Also - can the _IEPropertyGet return the frame name instead of the locationurl? I looked but did not see that option in ie.au3.

Link to comment
Share on other sites

Hi DanP2 - using the _IEFrameGetObjectByName has issues because some of the frames do not have a name. They do have an ID. I tried _IEGetObjectByID which also did not seem to work. I do not know if I have to get the frameset object first to get to the frame or why I could not just get to the frame by it's ID. 

My goal with the code in the first post was to see what AutoIt sees when looking at the page for the frames and framesets. 

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...