Hi guys
New to Autoit and this forum. Hoping to get some quality advice here. I am trying to write a script that will open a website in IE and enter an account number and do a search. I can get as far as opening up the website, however Can't really work out why it fails to input the account number and do the search. Could you guys please help me work out where I am going wrong? Thanks
My script:
#include <IE.au3> $oIE = _IECreate ("https://www.test.com/test/index") $o_form = _IEFormGetObjByName ($oIE, "f1") $o_account = _IEFormElementGetObjByName ($o_form, "ACCOUNT_NO") $o_signin = _IEFormElementGetObjByName ($o_form, "Wam.Action.Search") $accountnumber = "123456789" _IEFormElementSetValue ($o_account, $accountnumber) _IEAction ($o_signin, "click")
And the following from Page Source:
Plain Text
<HEAD> <META name="GENERATOR" content="IBM WebSphere Studio"> </HEAD> <table class="form" cellpadding="2" cellspacing="0" border="0" width="100%" align="middle"> <form action="/test/index" name="mainform" method="POST"> <input type='hidden' name='Wam.Tid' value='13ea875dae5'> <tr> <td colspan="4">Account no: <font face="Verdana" size="2"> <INPUT TYPE="TEXT" NAME="ACCOUNT_NO" VALUE="" SIZE="9" MAXLENGTH="9"></font> Customer no: <font face="Verdana" size="2"> <INPUT TYPE="TEXT" NAME="mainform1" VALUE="" SIZE="9" MAXLENGTH="9"></font> <INPUT TYPE="SUBMIT"VALUE="Search" NAME="Wam.Action.Search"> <INPUT TYPE="HIDDEN" NAME="FIELDMAP" VALUE="{ACCOUNT_NO=Params.AccountNumber}{mainform1=Params.CustomerNumber}"> </form> </table> <script> document.mainform.ACCOUNT_NO.focus(); // turn off right click on web browser to make it more difficult to print / view source if(navigator.appName.indexOf("Microsoft") != -1) document.oncontextmenu=function(){return false} </script>