GoldenMike Posted June 24, 2013 Share Posted June 24, 2013 I'm trying to automate a page. I've been doing this successfully for about a year or two now with all sorts of webpages. I'm having trouble with this one, and pretty sure it uses cross browser to load pages into a frameset from another source. <FRAMESET frameSpacing=0 border=0 frameBorder=0 rows="101, *"> <FRAME id=headerFrame noResize marginHeight=0 border=0 src="HeaderPage" frameBorder=0 name=navTop marginWidth=0 scrolling=no> <FRAMESET border=0 cols=200,*,0,0> <FRAME id=leftMenuFrame marginHeight=0 src="LeftMenuPage/wicket:pageMapName/HOME" name=leftMenu marginWidth=0> <FRAME onload=onFrameLoad() marginHeight=0 src="BodyPage" frameBorder=0 name=body marginWidth=0> </FRAMESET> <NOFRAMES> </NOFRAMES> </FRAMESET> </HTML> I can't seem to get into the "body" frame where all the content is? Are there any advanced users that can explain to me how this works and where can I find the source of this frame to get into it so I can automate my data lookups? Thanks, Mike Link to comment Share on other sites More sharing options...
jdelaney Posted June 24, 2013 Share Posted June 24, 2013 Each frame is like an embedded browser: _IEFrameGetCollection You will need to recursively call the above, to get to frames within frames. 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. Link to comment Share on other sites More sharing options...
GoldenMike Posted June 24, 2013 Author Share Posted June 24, 2013 Jdelaney, I am familiar with working with frames. I have successfully gone through frames on multiple websites to drill down to the elements I need. This sits is different though, I believe the frameset tags are somehow hindering me. When I do a _IEFrameGetCollection with @extended after this my console shows 5 frames. But then when I then For $oFrame1 in $oFrames ConsoleWrite($oFrame1.src) Next ;niether one of these works For $oFrame1 in $oFrames ConsoleWrite($oFrame1.name) Next I get no output. Not really sure where to go from here? Link to comment Share on other sites More sharing options...
DaleHohm Posted June 24, 2013 Share Posted June 24, 2013 Add _IEErrorHandlerRegister() to see if you are triggering any COM errors. 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...
GoldenMike Posted June 26, 2013 Author Share Posted June 26, 2013 I ran the IEErrorHandlerRegister() in three different spots and this is what I got: 1) Error Handler after _IEAttach --> COM Error Encountered in Test2.au3 ----> $IEComErrorScriptline = 46 ----> $IEComErrorNumberHex = 80020003 ----> $IEComErrorNumber = -2147352573 ----> $IEComErrorWinDescription = Member not found. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 2) ErrorHandler after 1st _IEFrameGetbyObjName() --> COM Error Encountered in Test2.au3 ----> $IEComErrorScriptline = 46 ----> $IEComErrorNumberHex = 80020003 ----> $IEComErrorNumber = -2147352573 ----> $IEComErrorWinDescription = Member not found. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 3) ErrorHandler after _IEFrameGetCollection() --> COM Error Encountered in Test2.au3 ----> $IEComErrorScriptline = 47 ----> $IEComErrorNumberHex = 80020003 ----> $IEComErrorNumber = -2147352573 ----> $IEComErrorWinDescription = Member not found. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 I am new to IEErrorHandler where can i find what all this means? Thanks again Link to comment Share on other sites More sharing options...
DaleHohm Posted June 27, 2013 Share Posted June 27, 2013 Well, start with the helpfile. _IEErrorHandlerRegister() is not a function that "runs" per se. It sets a trap for COM errors in your script and is triggered when one is encountered. You put it right after your include for IE.au3 and it is in effect for your entire script. What then becomes important is the line of code in your script that triggers the COM error. 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...
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