Followers 0

# Access Frame with no Name

## 7 posts in this topic

I am having problems on how to click a text link in a frame with no name.

IE Builder gave me the following information:

The frame with index number 9 is the one that contains the link that I want to click.

I hope Dale could help me.

##### Share on other sites

I found this code below from another thread to diagnose my problem:

$oFrames = _IETagNameGetCollection ($oIE, "frame")
ConsoleWrite("Frame Count: " & @extended & @CR)
$i = 0$sFrameInfo = ""
For $oFrame In$oFrames
$sFrameInfo &= "===============" & @CR$sFrameInfo &= "Frame: " & $i & @CR$sFrameInfo &= "Name: " & $oFrame.name & @CR$sFrameInfo &= "SRC: " & $oFrame.src & @CR$sFrameInfo &= ">>>>><HTML START><<<<<" & @CR & $oFrame.innerHTML & @CR$sFrameInfo &= ">>>>><HTML END><<<<<" & @CR
$i += 1 Next$sFrameInfo &= "==============="

$oFrame = _IEFrameGetCollection($oIE, $index) Dale Edit: Typo Edited by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl Automate input type=file (Related) SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble #### Share this post ##### Link to post ##### Share on other sites Thanks Dale, I've already tried that but the problem is I cannot access the contents of frame with$index = 1. Maybe because each of the frame content is in PHP. This is the only source code that the IE Builder is giving me.

<FRAME name=topFrame marginWidth=1 marginHeight=1 src="navBar.php?type=project&amp;nav= > Test Plan Metrics" noResize scrolling=no><FRAMESET border=0 frameSpacing=0 frameBorder=NO cols=30%,*><FRAME src="metrics/metricsLeft.php" scrolling=yes><FRAME name=mainFrame src="metrics/metricsSelection.php"></FRAMESET>

What do you think is the problem? Thanks a lot.

##### Share on other sites

Try this:

$index = 1 ; 0 = topFrame, 2 = mainFrame$oFrame = _IEFrameGetCollection($oIE,$index)

ConsoleWrite( _IEDocReadHTML($oFrame) & @CR) the example your have is not a good one because it is enumerating the frames as "tags" rather than as "windows" Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl Automate input type=file (Related) SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble #### Share this post ##### Link to post ##### Share on other sites I've already tried that also Dale, anyway I tried once more but same result: #include <IE.au3>$oIE = _IECreate("https://www.xxxxxx.com/metrics/metricsFrameSet.php?nav=%20>%20Test%20Plan%20Metrics")
$index = 1; 0 = topFrame, 2 = mainFrame$oFrame = _IEFrameGetCollection($oIE,$index)
ConsoleWrite( _IEDocReadHTML($oFrame) & @CR) Got an error: C:\Program Files\AutoIt3\beta\Include\IE.au3 (2214) : ==> The requested action with this object has failed.: Return$o_object.document.documentElement.outerHTML
Return \$o_object.document^ ERROR

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