JackyChan Posted February 5, 2009 Share Posted February 5, 2009 https://checkout.google.com/view/buy?o=shop...658175559340706I 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.documentReturn $o_object.document^ ERRORHere 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 More sharing options...
PsaltyDS Posted February 5, 2009 Share Posted February 5, 2009 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 More sharing options...
JackyChan Posted February 5, 2009 Author Share Posted February 5, 2009 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 More sharing options...
PsaltyDS Posted February 5, 2009 Share Posted February 5, 2009 (edited) 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 February 5, 2009 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 More sharing options...
JackyChan Posted February 5, 2009 Author Share Posted February 5, 2009 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. Can we get value of form in frame on a different site ? Link to comment Share on other sites More sharing options...
DaleHohm Posted February 5, 2009 Share Posted February 5, 2009 (edited) 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 February 5, 2009 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...
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