AnushaNemani Posted June 29, 2016 Posted June 29, 2016 I don't have any idea about AutoIT Scripting, I have one AutoIT Script which will run automatically by clicking one button in my tool. With this one webpage will be opened and we need to enter username and password and by submitting it will login to the account. But here I have a task to automate the process of entering the Username and Password and clicking submit button. I need to read the credentials from the tool and end the process automatically. I was Successful in reading credentials from tool but I am facing issue in auto submitting the form. Now when the webpage is opening the username and password are populating automatically, Please help me to click on the submit button automatically by validating the username and Password field in AutoIT Scripting. Below is the code I have. Please suggest syntax to auto submitting this form by validating username and password fields. ; ------------------ ; Handle login here! ; CHANGE_ME ; ------------------ Local $o_form = _IEFormGetObjByName ($oIE, "loginData") Local $o_user = _IEFormElementGetObjByName ($o_form, "j_username") ;Send("{TAB}") Local $o_password = _IEFormElementGetObjByName ($o_form, "j_password") ;Send("{TAB}") Local $o_signin = _IEFormElementGetObjByName ($o_form, "submit") ;Send("{ENTER}") ; Set field values and submit the form _IEFormElementSetValue ($o_user, $TargetUsername) _IEFormElementSetValue ($o_password, $TargetPassword) _IEAction ($o_signin, "Click")
RyukShini Posted June 29, 2016 Posted June 29, 2016 Maybe this will help! ; ------------------ ; Handle login here! ; CHANGE_ME ; ------------------ Local $o_form = _IEFormGetObjByName ($oIE, "loginData") Local $o_user = _IEGetObjByName($o_form, "j_username") Local $o_password = _IEGetObjByName$o_form, "j_password") Local $o_signin = _IEGetObjByName($o_form, "submit") ; Set field values and submit the form _IEFormElementSetValue ($o_user, $TargetUsername) _IEFormElementSetValue ($o_password, $TargetPassword) _IEAction ($o_signin, "Click") Maybe post the HTML as well or else it is quite hard for us. Look in to _IEGetObjByName $oIE.document.GetElementsByTagName And maybe take a look here:https://www.autoitscript.com/autoit3/docs/libfunctions/ Then look for IE examples.
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