raquien Posted October 22, 2007 Share Posted October 22, 2007 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. Link to comment Share on other sites More sharing options...
raquien Posted October 22, 2007 Author Share Posted October 22, 2007 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 &= "===============" ConsoleWrite($sFrameInfo & @CR) And the result is this: Frame Count: 3 =============== Frame: 0 Name: topFrame SRC: navBar.php?type=project&nav= > Test Plan Metrics >>>>><HTML START><<<<< 0 >>>>><HTML END><<<<< =============== Frame: 1 Name: 0 SRC: metrics/metricsLeft.php >>>>><HTML START><<<<< 0 >>>>><HTML END><<<<< =============== Frame: 2 Name: mainFrame SRC: metrics/metricsSelection.php >>>>><HTML START><<<<< 0 >>>>><HTML END><<<<< =============== The result is telling me that I still cannot access the Text Link that I want to click. This is because the SRC of each of the frame is a .PHP page. Any suggestions on what I need to do? Link to comment Share on other sites More sharing options...
raquien Posted October 23, 2007 Author Share Posted October 23, 2007 Hi guys, I really need your help on this one. The problem that I have is that the contents of each of the frame is a PHP-scripted page. And I can't get the link that I want to click. Link to comment Share on other sites More sharing options...
DaleHohm Posted October 23, 2007 Share Posted October 23, 2007 (edited) $index = 1 ; 0 = topFrame, 2 = mainFrame $oFrame = _IEFrameGetCollection($oIE, $index) Dale Edit: Typo Edited October 23, 2007 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds 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 Link to comment Share on other sites More sharing options...
raquien Posted October 23, 2007 Author Share Posted October 23, 2007 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&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. Link to comment Share on other sites More sharing options...
DaleHohm Posted October 23, 2007 Share Posted October 23, 2007 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 MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds 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 Link to comment Share on other sites More sharing options...
raquien Posted October 23, 2007 Author Share Posted October 23, 2007 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 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