Sign in to follow this  
Followers 0
lkinderman

_IEFrameGetCollection not returning frames

5 posts in this topic

I have just recently upgraded to the latest and greatest AutoIt.  In my old code, I used _IEFrameGetObjByName with an ID which returned the frame object I was looking for.  Now with the new AutoIt, I am required to enter the Frame Name but there isn't one defined in the html.  So, I have modified my code to use _IEFrameGetCollection.  When I make this call, @extended is set to 4 but it returns an empty array.  Here is my code:

$aoiFrames = _IEFrameGetCollection($oIE)
    MsgBox(0,"","number of frames = " & @extended)
    For $oiFrame in $aoiFrames
        MsgBox(0,"","Frameid = " & string($oiFrame.id))
    Next

Any help would be appreciated.

Share this post


Link to post
Share on other sites



Yes, I have reviewed that thread, but it wasn't working for me.  I did find a thread later last night that helped, >thread.  Once I removed this update to IE11, I was able to use _IEFrameGetObjById.  But this still doesn't explain some things:

1.  When I use _IEFrameGetCollection, it returns @extended=4, but the array is still empty so I can't loop thru the array elements.  This is fine because I have a work around but I still don't understand why this is happening.

2.  When I use _IEFrameGetObjById, if I use _IEPropertyGet "outerhtml" on the returned frame object, it does not return the <iframe> tag html.  It only returns the html within the <iframe> tag.

3.  If I use _IEFrameGetCollection and pass an index, I also don't see the <iframe> tag html when I use _IEPropertyGet "outerhtml" on the returned frame object.

At this point, I can continue coding, but wanted to at least put this out there.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I'm not exactly sure why, but the frame|iframe collection can not be looped through like the other standard html object collections.

Look at the helpfile for the work-around...Instead of looping through the collection, itterate through the @extended, and specifically _ieframegetcollection based on that counting.  Click this link:

_IeFrameGetCollection
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Thanks.  I should have read this more closely.

Share this post


Link to post
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
Sign in to follow this  
Followers 0