realtebo Posted February 18, 2015 Share Posted February 18, 2015 (edited) I'm doing this expandcollapse popup#include <IE.au3> Call ("SignIn"); Func SignIn () Global $browser = _IECreate('domain.tld'); Local $username = "my-username"; Local $password = "my-pwd"; Local $username_field = _IEFormElementGetObjByName ( $browser, "username" ); Local $pwd_field = _IEFormElementGetObjByName ( $browser, "pwd" ); Local $submit_btn = _IEGetObjById ( $browser, "login-button-container"); _IEFormElementSetValue ($username_field, $username); _IEFormElementSetValue ($pwd_field, $password); _IEAction ( $browser, "click"); EndFunc It works, but in AutoIt console I got this --> IE.au3 T3.0-1 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType --> IE.au3 T3.0-1 Error from function _IEFormElementGetObjByName, $_IESTATUS_InvalidObjectType --> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType --> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType --> IE.au3 T3.0-1 Error from function _IEAction(click), $_IESTATUS_InvalidObjectType Why? Edited February 18, 2015 by realtebo Link to comment Share on other sites More sharing options...
Solution realtebo Posted February 18, 2015 Author Solution Share Posted February 18, 2015 I was misunsing the objects Local $form = _IEFormGetObjByName($browser, "loginForm"); Local $username_field = _IEFormElementGetObjByName ( $form, "username" ); Local $pwd_field = _IEFormElementGetObjByName ( $form, "password" ); Local $submit_btn = _IEGetObjById ( $browser, "login-button-container"); Link to comment Share on other sites More sharing options...
SorryButImaNewbie Posted February 18, 2015 Share Posted February 18, 2015 Hello! Welcome to the forum, and good job on correcting your code. Also good job on naming the thread Solved, but you can also mark your post as best answer, and the forum mark your thread answered! Best of luck with your future endeavors! Link to comment Share on other sites More sharing options...
realtebo Posted February 18, 2015 Author Share Posted February 18, 2015 Thanks for this suggestions... It since a long time I'm lurking this forum but only today I'm really starting to experimenting 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