Jump to content

Frames - More Questions


Recommended Posts

Hi,

Having some issues with frames:

#include <IE.au3>
_IEErrorHandlerRegister()

$oIE = _IEAttach("Advanced")

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"))
Next

Teh above example is mainly taken from the Help file. The website has diabled the toolbar, and I cannot gain access to IE developer tools:

I've been trying to get the source or any information from the frames, not getting any errors, but nothing is happening as well.

I do get the following Error from _IEErrorHandlerRegister(), does any one have any more indepth knowledge on how I would proceed with this

--> COM Error Encountered in test.au3
----> $IEComErrorScriptline = 2705
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = Access is denied.
----> $IEComErrorDescription = 
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = 
----> $IEComErrorHelpContext = 0
----> $IEComErrorLastDllError = 0

--> COM Error Encountered in test.au3
----> $IEComErrorScriptline = 2705
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = Access is denied.
----> $IEComErrorDescription = 
----> $IEComErrorSource = 
----> $IEComErrorHelpFile = 
----> $IEComErrorHelpContext = 0
----> $IEComErrorLastDllError = 0
Link to comment
Share on other sites

"Access is denied" is telling you you have a cross-site scripting issue (frame pointed to sources on a different server than the top-level document).  Scripting is disabled by security.

You can use _IEPropertySet to add the window decorations to an existing browser window and then use developer tools, debugbar or whatever to go further.

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

Dale,

Thank you _IEpropertyset worked great, I have the developer toolbar up, and I'm looking at the profiler and the network tabs, and there seems to be like a milliion things going on. Is there any recommendations where I can read up on this somewhere to better educate myself. Have you successfully gotten around cross browser scripting in the past? It seems pretty complicated for someone like me who understand autoIT IE.au3 pretty well, but doesn't have too much other programming experience?

Link to comment
Share on other sites

What I have done is to determine the URL of the frame source and then open it in a new top-level browser window.

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

I tried doing that and I got some type of internal server error - when you say new top-level browser window, what exactly are you referring to? Just a new instance of IE, or does it somehow have to be tied to the orignal website with whatever secure information originally brought up the page in the frame? If so, how do you do this? I am very curious about this, as this would help me greatly to automate some tasks in my business, so I will probably have a lot of questions. I apologize in advance.

Link to comment
Share on other sites

Sorry, my wording was obtuse.  I did mean a new IE instance.  There can easily be issues with the site in question that will prevent this from working, but when I have needed it, it has worked.

The security feature at play here goes by the name "Cross-site scripting (XSS)".  You can google it.  It can be disabled in IE by disabling the XSS filter.  Be careful, however, because it can be a dangerous exploit in the wild.

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

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

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...