vcrocca Posted March 19, 2008 Share Posted March 19, 2008 Been searching help and this forum all day for a solution to this. I am going to a web site and filling in a form. Then using the _IEAction command the form is submitted. This opens a new browser window that has another login form on it. I use _IEAttach to attach to the window and it does so sucessfully but then when I try to collect the forms using _IEFormGetCollection it states there are no forms on the page. If I use IE-Builder and look at the source of this second window by typing in the URL directly I see the form. If I modify the script to open the second Window directly (not being spawned from the first window) it finds the form. So for whatever reason the spawned second window does not report any forms. Any help would be appreciated. Code is below with private information represented by ****** [/code] #AutoIt3Wrapper_Run_Debug_Mode=Y #NoTrayIcon #include <IE.au3> RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\*********.com", "http", "REG_DWORD", "2") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\*********.com", "https", "REG_DWORD", "2") $oIE = _IECreate ("www.**********.com") $oForm = _IEFormGetObjByName ($oIE, "cust_info") $oSubmit = _IEGetObjByName ($oIE, "action") $oQuery = _IEFormElementGetObjByName ($oForm, "cust_nbr") _IEFormElementSetValue ($oQuery, "*****") _IEAction ($oSubmit, "click") _IELoadWait ($oIE) $oIE = _IEAttach ("signon", "WindowTitle") MsgBox(4096,"test", @error) Sleep(3000) $oForms = _IEFormGetCollection ($oIE) $iNumForms = @extended MsgBox(0, "Forms Info", "There are " & $iNumForms & " forms on this page") For $i = 0 to $iNumForms - 1 $oFormi = _IEFormGetCollection ($oIE, $i) MsgBox(0, "Form Info", $oFormi.name) Next [code] Link to comment Share on other sites More sharing options...
vcrocca Posted March 20, 2008 Author Share Posted March 20, 2008 wow is this such a tough issue that no one has any ideas? Or did I not provide enough information? If anyone has any idea what is wrong I would appreciate some help. If I missed something obvious I apologize. 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