lkinderman Posted January 8, 2015 Posted January 8, 2015 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.
Danp2 Posted January 8, 2015 Posted January 8, 2015 You may want to review >this thread. Latest Webdriver UDF Release Webdriver Wiki FAQs
lkinderman Posted January 8, 2015 Author Posted January 8, 2015 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.
jdelaney Posted January 8, 2015 Posted January 8, 2015 (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 January 8, 2015 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.
lkinderman Posted January 8, 2015 Author Posted January 8, 2015 Thanks. I should have read this more closely.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now