benydc Posted February 20, 2012 Share Posted February 20, 2012 Ok, I am trying to attack to an url I opening. I doesn't want to attach to it everytime I try and with different methods. Here is the current code I am using: #include <IE.au3> ; Create a browser window and navigate #AutoIt3Wrapper_Run_Debug_Mode=Y _IEErrorHandlerRegister() Global $sUrl = "http://vasthits.com/index.php?_w=login" Global $oIE = _IEAttach($sUrl, "url") If not isObj($oIE) Then $oIE = _IECreate() _IENavigate($oIE, $sUrl) EndIf If IsObj(_IEAttach ("VastHits.com Manual Traffic Exchange", "Embedded")) Then ConsoleWrite("Success" & @CRLF) ; get pointers to the login form and username and password fields $o_frame = _IEFrameGetCollection($oIE, 1) $o_form = _IEFormGetObjByName($o_frame, "login_form") ;Hidden fields for user name and password $o_login = _IEFormElementGetObjByName($o_form, "email") $o_password = _IEFormElementGetObjByName($o_form, "password") ; Set field values and submit the form _IEFormElementSetValue($o_login, "1234") _IEFormElementSetValue($o_password, "abcd") ;~ _IEFormSubmit($o_form) ;Instead of form submit, simulate click on the Login button $o_loginbutton = _IEFormElementGetObjByName($o_form, "loginbutton") _IEAction($o_loginbutton, "B1") Exit and this is the error message: --> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Warning from function _IEFrameGetCollection, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEFormGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType What in the world I am doing wrong? If you can tell me whats wrong and why it doesn't I will handle from there. Link to comment Share on other sites More sharing options...
benydc Posted February 20, 2012 Author Share Posted February 20, 2012 Never mind, I got it working. Link to comment Share on other sites More sharing options...
Wertz Posted December 1, 2018 Share Posted December 1, 2018 Hi benydc, Like you did to work, I'm trying to do something like that and I can not find a way out... Link to comment Share on other sites More sharing options...
Danp2 Posted December 1, 2018 Share Posted December 1, 2018 @Wertz The OP hasn't been online in 6 years, so you won't likely get an answer from him / her. Best to just start a new thread. Be sure to accurately describe what you are attempting to do and be sure to post your code. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Wertz Posted December 2, 2018 Share Posted December 2, 2018 @Danp2, I will create a new topic to better explain what I need. Thank you. 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