RAMzor Posted September 25, 2005 Share Posted September 25, 2005 (edited) Hi All, im a newbie in webscripting.How can I filling related input fields on this Page?I have tried this code:_BankLeumiLogin( "AAAA", "BBBBB", "CCCC") Func _BankLeumiLogin( $UserID, $Password, $Auth ) $oIE = _IECreate() _IENavigate($oIE, "https://hb2.bankleumi.co.il/Homebank/pre_default.asp") $o_Form = _IEFormGetObjByName($oIE, "form2") $o_UserID = _IEFormElementGetObjByName($o_Form, "uid") $o_Auth = _IEFormElementGetObjByName($o_Form, "auth_field") $o_Passw = _IEFormElementGetObjByName($o_Form, "password") _IEFormElementSetValue($o_UserID, $UserID) _IEFormElementSetValue($o_Auth, $Auth) _IEFormElementSetValue($o_Passw, $Password) _IEFormSubmit($o_form) EndFunc Exit Edited September 25, 2005 by RAMzor Link to comment Share on other sites More sharing options...
Confuzzled Posted September 25, 2005 Share Posted September 25, 2005 Is this a phishing site? Link to comment Share on other sites More sharing options...
DaleHohm Posted September 25, 2005 Share Posted September 25, 2005 You did well in tearing apart the form to get the element names in this code. What you missed however is that the form is in a frame (named "body") in a frameset, so you need to get a reference to that frame instead of the top level. Something like this:$oFrame = _IEFrameGetObjByName($oIE, "body")Insert this after your Navigate command and then use $oFrame instead of $oIE in your _IEFormGetObjByName command.Also notice that the buttons have onclick Javascript tied to them. Because of this it may be necessary to perform a .click action on them to submit the form instead of using the generic form submit action. You should be able to create a reference to the buttons in a similar way that you did the input fields an then do $oButton.clickDaleHi All, im a newbie in webscripting.How can I filling related input fields on this Page?I have tried this code:_BankLeumiLogin( "AAAA", "BBBBB", "CCCC") Func _BankLeumiLogin( $UserID, $Password, $Auth ) $oIE = _IECreate() _IENavigate($oIE, "https://hb2.bankleumi.co.il/Homebank/pre_default.asp") $o_Form = _IEFormGetObjByName($oIE, "form2") $o_UserID = _IEFormElementGetObjByName($o_Form, "uid") $o_Auth = _IEFormElementGetObjByName($o_Form, "auth_field") $o_Passw = _IEFormElementGetObjByName($o_Form, "password") _IEFormElementSetValue($o_UserID, $UserID) _IEFormElementSetValue($o_Auth, $Auth) _IEFormElementSetValue($o_Passw, $Password) _IEFormSubmit($o_form) EndFunc Exit Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
RAMzor Posted September 26, 2005 Author Share Posted September 26, 2005 (edited) Hi Dale,It's worked nice!!! Thank you wery much!P.S. This is National Bank of Israel Edited September 26, 2005 by RAMzor 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