Floppy Posted October 17, 2011 Posted October 17, 2011 (edited) Hello I'm trying to set values into the following form:<form action"" method="post"><p></p><p><br></p><p><input name="login_email" type="text"/></p><p><input name="login_password" type="password"/></p><p><br></p><p></form></p> I tried with this code: <div>$IE = ObjCreate("Shell.Explorer.2")</div><div>GUICtrlCreateObj($IE,0,0,800,600)</div></p><p><div>_IENavigate($IE,"http://===.com/auth/form/login/")</div><div>$login_form = _IEFormGetCollection($IE)</div><div>$login_email = _IEFormElementGetObjByName($login_form,"login_email")</div><div>$login_password = _IEFormElementGetObjByName($login_form,"login_password")</div><div>_IEFormElementSetValue($login_email,"test",0)</div><div>_IEFormElementSetValue($login_password,"test",1)</div> But it doesn't work because I get the following output: --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType Please, can someone help me? Thank you Edited November 13, 2011 by FSoft
Herb191 Posted October 17, 2011 Posted October 17, 2011 Hi FSoft, Do you have the URL of the form? If so I will take a crack at it...
bogQ Posted October 18, 2011 Posted October 18, 2011 (edited) something like? #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $IE = ObjCreate("Shell.Explorer.2") GUICreate("Embedded Web control Test", 640, 580, -1, -1,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) GUICtrlCreateObj($IE,0,0,800,600) _IENavigate($IE,"http://mygengo.com/auth/form/login/",0) GUISetState() _IELoadWait($IE) $login_email = _IEGetObjByName($IE,"login_email") $login_password = _IEGetObjByName($IE,"login_password") _IEFormElementSetValue($login_email,"test") _IEFormElementSetValue($login_password,"test") MsgBox(0,'','The End') Edit: added include on top of script Edited October 18, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
Floppy Posted October 18, 2011 Author Posted October 18, 2011 Output: --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidObjectType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidObjectType
bogQ Posted October 18, 2011 Posted October 18, 2011 we apparently aren't getting identical results, for me it works fine, are you sure that you copied identical code? post OS,IE and autoit version so that anyone who have that configuration to try to test it. TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
Floppy Posted October 19, 2011 Author Posted October 19, 2011 Windows 7 SP1 32 bit IE9 AutoIT v3.3.6.1
Bert Posted October 20, 2011 Posted October 20, 2011 You are using IE 9. That is the problem. Go here for more information: The Vollatran project My blog: http://www.vollysinterestingshit.com/
Bert Posted October 20, 2011 Posted October 20, 2011 I read the entire thread, You need the latest beta installed and use that instead of the current release. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Floppy Posted October 20, 2011 Author Posted October 20, 2011 I updated to the latest beta. Same output: --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidObjectType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidObjectType
Bert Posted October 20, 2011 Posted October 20, 2011 I would read the thread to see if you can gain anymore information The Vollatran project My blog: http://www.vollysinterestingshit.com/
Floppy Posted October 20, 2011 Author Posted October 20, 2011 Thanks, now it works. It was not working because I didn't run it with the beta compiler.
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