ckelsoe Posted July 28, 2013 Share Posted July 28, 2013 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 More sharing options...
Danp2 Posted July 28, 2013 Share Posted July 28, 2013 Once you have an object reference, you should be able to just check the value of $oFrame.name. Also, if you know the name of the iframe, you could use _IEFrameGetObjByName instead of looping through all of the iframes. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ckelsoe Posted July 28, 2013 Author Share Posted July 28, 2013 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 More sharing options...
Danp2 Posted July 28, 2013 Share Posted July 28, 2013 Perhaps >this UDF will help you out. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
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