kalel69 Posted August 25, 2011 Share Posted August 25, 2011 Hi Folks. I've tried everything I can think of to get to click one button on a secure webpage I use for work. Unfortunately because its secure I can not share the page. but I can give as much information about it as I can. WinActivate("Project Details") $oIE = _IEAttach("Project Details") $oIFrame = _IEFrameGetObjByName($oIE, "ifmPage") $oForm = _IEFormGetObjByName ($oIFrame, "frmUsers") $oQueryUser = _IEFormElementGetObjByName ($oForm,"login") $oSubmit = _IEFormElementGetObjByName ($oForm,"button1") _IEFormElementSetValue ($oQueryUser, $PhysToUpdateAndDisable) _IEAction ($oSubmit, "click") _IELoadWait ($oIE)This is how I can access most forms. Even within Iframes. however, sometimes its hit or miss. Most of my forms are contained in a frame call "ifmPage". So instead of attaching to the IE object, I attach to the frame object, and that usually works. However, at the bottom of the page, are addition buttons, java scripted, they are not in ifmPage, and I can not find the frame the footer is in. I used the get frame collections, and still could not get it. I've tried to view all the source code I can grab, but still no mention of other frames. I know its in the footer, but I can not attach to what ever that frame is called, so I can't grab the form objects which are clearly labeled in the code in the standard format.$oIFrame = _IEFrameGetObjByName($oIE, "ProjDetailFooter"); NOPE - can't find this iframeoForm = _IEFormGetObjByName($oIFrame, "footerform") ; can't see this form when pointed to ifmpage!Any Ideas? I love this program by the way!Thanks in Advance! Link to comment Share on other sites More sharing options...
DaleHohm Posted August 25, 2011 Share Posted August 25, 2011 Please be more specific than "can't find" and "can't see". What output is sent to the SciTe console? Have you tried a DOM inspector like DebugBar? 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...
kalel69 Posted August 26, 2011 Author Share Posted August 26, 2011 Please be more specific than "can't find" and "can't see". What output is sent to the SciTe console? Have you tried a DOM inspector like DebugBar?DaleSorry, I was thinking about that also:--> IE.au3 V2.4-0 Warning from function _IEGetObjById, $_IEStatus_NoMatch (footerform)--> IE.au3 V2.4-0 Warning from function _IEGetObjById, $_IEStatus_NoMatch (btn_pg3)--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataTypethese are the errors, here are the attach statements:$oIE = _IEAttach("Project Tracking")$oIFrame = _IEFrameGetObjByName($oIE, "ProjectDetailFooter")$oForm=_IEGetObjById ($oIFrame, "footerform")$osubmit=_IEGetObjById ($oForm, "btn_pg3")_IEAction ($osubmit, "click")_IELoadWait ($oIE)I believe the main html has 3 frames. Main, ifmPage for the project details (this I'm sure of cause it works in here), and the ProjectDetailFooter, but that is the one I can't seem to attach to.I've tried may combinations of frame/form, but nothing for the footer buttons. I just want to be able to press a button to move it to another page view. Nothing to submit, just press the button.I have tried to search for button text, Links in the footer, i can't find anything. I used a developer tools in IE9 to catch the scripts and I can view each frame of scripts independently. I have looked at the source and found the info I needed, such as btn_pg3 in the footer, and the footer form being called "footerform". the problem is I can the autoIT attach to the frame used by footerform, which I believe is called "projectDetailFooter" iframe, but I am not 100% sure of that, and even using the developer tools in IE I can not clearly say it is the frame I need to attach too.Thanks for your previous quick reply!it is most appreciated. Link to comment Share on other sites More sharing options...
aNewLyfe Posted August 26, 2011 Share Posted August 26, 2011 i.. guess.... explorer will not let you do this cause of security reasons but, not sure. ~ Every Living Thing is a Code Snippet of World Application ~ Link to comment Share on other sites More sharing options...
kalel69 Posted August 26, 2011 Author Share Posted August 26, 2011 Well, after pouring over this many more hours, I did figure it out. Thanks for the help here though. Here was my solution, if anyone is interested: $oIE = _IEAttach("Project Tracking") $oFrame = _IEFrameGetObjByName($oIE, "ifmPage") $iframe = _IEFrameGetObjByName($oFrame, "ProjDetailFooter") $oForm=_IEGetObjById ($iframe, "footerform") $osubmit=_IEGetObjById ($oForm, "btn_pg3") _IEAction ($osubmit, "click") _IELoadWait ($oIE) apparently the frame "ifmPage" was holding 2 sub iframes. "ProjectDetailsFrame" and "projectDetailFooter". After I drilled down Deep enough, I was able to attach to the "notes" page (btn_pg3) Thanks again. I don't know what I would do without AutoIT ! 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