Jump to content

IE.au3 Error!


Recommended Posts

https://checkout.google.com/view/buy?o=shop...658175559340706

I tried get value of Email form in that URL. But \ ...

C:\Program Files\AutoIt3\Include\IE.au3 (2547) : ==> The requested action with this object has failed.:

Return $o_object.document

Return $o_object.document^ ERROR

Here is my code:

#include <IE.au3>
$oIE = _IEAttach("checkout.google.com", "URL")
$oFramez = _IEFrameGetObjByName ($oIE, "login")
$oFormz = _IEFormGetCollection ($oFramez, 0)
$oTextz = _IEFormElementGetObjByName ($oFormz, "Email")
MsgBox(0, '1', _IEFormElementGetValue ($oTextz))
Link to comment
Share on other sites

https://checkout.google.com/view/buy?o=shop...658175559340706

I tried get value of Email form in that URL. But \ ...

C:\Program Files\AutoIt3\Include\IE.au3 (2547) : ==> The requested action with this object has failed.:

Return $o_object.document

Return $o_object.document^ ERROR

Here is my code:

#include <IE.au3>
$oIE = _IEAttach("checkout.google.com", "URL")
$oFramez = _IEFrameGetObjByName ($oIE, "login")
$oFormz = _IEFormGetCollection ($oFramez, 0)
$oTextz = _IEFormElementGetObjByName ($oFormz, "Email")
MsgBox(0, '1', _IEFormElementGetValue ($oTextz))
If the Frame is at a different site than the parent page, then cross-site scripting protection built in to IE is blocking access.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

If the Frame is at a different site than the parent page, then cross-site scripting protection built in to IE is blocking access.

:)

But if i edit this script - other frame in that link:

#include <IE.au3>
$oIE = _IEAttach("checkout.google.com", "URL")
$oFramez = _IEFrameGetObjByName ($oIE, "signup")
$oFormz = _IEFormGetCollection ($oFramez, 0)
$oTextz = _IEFormElementGetObjByName ($oFormz, "Email")
MsgBox(0, '1', _IEFormElementGetValue ($oTextz))

It's work! Why?

I want get value of Email in "Login" frame. not "signup"

How to ?

Link to comment
Share on other sites

But if i edit this script - other frame in that link:

#include <IE.au3>
$oIE = _IEAttach("checkout.google.com", "URL")
$oFramez = _IEFrameGetObjByName ($oIE, "signup")
$oFormz = _IEFormGetCollection ($oFramez, 0)
$oTextz = _IEFormElementGetObjByName ($oFormz, "Email")
MsgBox(0, '1', _IEFormElementGetValue ($oTextz))

It's work! Why?

I want get value of Email in "Login" frame. not "signup"

How to ?

If the frame named "signup" is in the same site as the parent, but the frame "login" is on a different site, then only the later would invoke cross-site scripting protection.

:)

Doh! I always forget the error handler. As Dale points out below, add _IEErrorHandlerRegister() and run it from SciTE and you will get explicit debug info in the console window that will tell you where the problem is. If cross-site scripting is the issue, you get "Access denied".

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

See my sig for a link to info on the cross-site scripting restriction. To get to a frame in another domain, open its URL in a new window. To verify this is the issue, use _IEErrorHandlerRegister() and see if you get an Access is Denied error at the console.

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...