squishlax Posted March 16, 2007 Posted March 16, 2007 I've searched and searched, and tried and tried, but I cannot find a way to fix my problem. Currently I'm using mouseclicks all over the place to accomplish my tasks, but they don't always work and I would like to use the ie functions to select form elements and change them and whatnot. I apologize that it's an internal website in the company I work at and you won't be able to test any code you post to help me, but here goes .. Here's the main page HTML source with the URLs stripped out for security reasons: CODE<html dir='ltr'> <!-- Copyright © 2000-2005 PeopleSoft, Inc. All Rights Reserved. IE/6.0 ToolsRel:8.47.03 Portal Target URL: http://--> <head> <script language="Javascript"> document.domain=""; </script> <meta name="generator" content="HTML Tidy, see www.w3.org"> <title>Financials Supply Chain 8.4</title> </head> <frameset border="0" frameborder="no" framespacing="0" rows="65,*"> <frame name="UniversalHeader" title="Portal Header" scrolling="no" frameborder="no" noresize src="http://"> <frameset id="SubFrame" border="0" frameborder="no" framespacing="0" cols="195,*"> <frame name="NAV" title="Main Content" frameborder="no" scrolling="auto" noresize src="http://"> <frame name="TargetContent" title="Main Content" scrolling="auto" frameborder="no" noresize src="http://"> </frameset> </frameset> </html> Here's my test code again with the URL stripped out for security reasons, I really do have the correct one there it opens the window and loads the page fine (the one thing I've done right so far): Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) #include <IE.au3> $oIE = _IECreate("http://") _IELoadWait($oIE) $oFrames = _IEFrameGetCollection($oIE) $i_NumFrames = @extended MsgBox(0, "Frames", $i_NumFrames) $o_SubFrame = _IEFrameGetObjByName($oIE, "TargetContent") I can get it to tell me that there are 3 frames using _IEFramesGetCollection, however it errors out if I try to get more specific using an index or _IEFramesGetObjByName .. this is the error I'm getting: :\Program Files\AutoIt3\Include\IE.au3 (769) : ==> The requested action with this object has failed.: If $o_object.document.body.tagName = "FRAMESET" Then If $o_object.document^ ERROR I can't get it to see just the form or links inside the frame either, the form name is "win0" inside the "TargetContent" frame, even when using the _IEFormGetObjByName or _IEFormGetCollection .. and nothing I do is working.. Thanks for your help if you can provide any!!
DaleHohm Posted March 16, 2007 Posted March 16, 2007 (edited) Most likely it is a cross-site scriptiing security issue (the top level site and the TargetContent site are on different servers). I'd like you to post the SciTe console output both with and without the following line near the top of your script (after the includes): _IEErrorHandlerRegister() You may need to open the page pointed to by the src= of TargetContent in a seperate browser window instead of getting to it via the frameset. Dale Edit: small typo Edited March 16, 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
squishlax Posted March 19, 2007 Author Posted March 19, 2007 thanks! loading the frame source in its own window worked.
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