TmanMrT Posted December 27, 2007 Share Posted December 27, 2007 How does this work out? This is the bit of HTML code that is relevant to the form I am trying to submit: CODE<table border="0" cellpadding="2" cellspacing="0" align="center"> <tr> <td class="defaultstyle" align="right"><label for="user_id">user ID:</label></td> <td class="defaultstyle" align="left"> <input type="text" name="user_id" id="user_id" size="20" maxlength="20" value="WEBSERVER"> </td> </tr> <tr> <td class="defaultstyle" align="right"><label for="password">PIN:</label></td> <td class="defaultstyle" align="left"> <input type="password" name="password" id="password" size="20" maxlength="20" value=""> </td> </tr> </table> <p align="center"><input type="submit" value="Login"></p> </form> so "user_id" is easy to identify, and "password" too. but how exactly do i click on the submit button? i will think you're pretty clever if you can figure this out. Link to comment Share on other sites More sharing options...
TomZ Posted December 27, 2007 Share Posted December 27, 2007 You do not need to use that button, you can simply use the _IEFormSubmit($form) function. Link to comment Share on other sites More sharing options...
DaleHohm Posted December 27, 2007 Share Posted December 27, 2007 How does this work out?This is the bit of HTML code that is relevant to the form I am trying to submit:CODE<table border="0" cellpadding="2" cellspacing="0" align="center"> <tr> <td class="defaultstyle" align="right"><label for="user_id">user ID:</label></td> <td class="defaultstyle" align="left"> <input type="text" name="user_id" id="user_id" size="20" maxlength="20" value="WEBSERVER"> </td> </tr> <tr> <td class="defaultstyle" align="right"><label for="password">PIN:</label></td> <td class="defaultstyle" align="left"> <input type="password" name="password" id="password" size="20" maxlength="20" value=""> </td> </tr></table> <p align="center"><input type="submit" value="Login"></p> </form> so "user_id" is easy to identify, and "password" too. but how exactly do i click on the submit button?i will think you're pretty clever if you can figure this out. Since you didn't include the source the form or the button above, we cannot help with specifics.TomZ is correct however, you may be able to use _IEFormSubmit. If the form has no name or ID attribute, you can get a reference to it with _IEFormGetCollection using an index parameter. If the submit button doesn't have a name or an ID attribute, you can get a reference to it with _IEFormElementGetCollection also passing an index parameter. You can click the button than using _IEAction($oButton, "click") assuming that the reference to the button is in $oButton.Dale 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...
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