Andy Posted February 23, 2009 Share Posted February 23, 2009 I'm trying to automate logging in to GoArticles to save time, and whaddya know, their login form doesn't have a name so when I try the following: $o_form = _IEFormGetObjByName ($oIE, "form") $o_login = _IEFormElementGetObjByName ($o_form, "email") $o_password = _IEFormElementGetObjByName ($o_form, "password") $o_signin = _IEFormElementGetObjByName ($o_form, "Login") AutoIt just spits errors at me, not surprisingly really. Anyone know if there's a 'default' name for a form if it has no name? Or any other clever ways around this little problem? Link to comment Share on other sites More sharing options...
exodius Posted February 23, 2009 Share Posted February 23, 2009 (edited) Look at _IEFormGetCollection, you might be able to reference it by index. Otherwise, You can try getting objects for the different form elements using _IEGetObjByName and then still using _IEFormElementSetValue to set the value of the input fields, then _IEAction ($object, "click") to click the submit button (followed by an _IELoadwait($object)). Edited February 23, 2009 by exodius Link to comment Share on other sites More sharing options...
Authenticity Posted February 23, 2009 Share Posted February 23, 2009 #include <IE.au3> Dim $o_IE = _IECreate('http://www.goarticles.com/ulogin.html') $Email = _IEGetObjByName($o_IE, 'email') $Pass = _IEGetObjByName($o_IE, 'password') $Click = _IEGetObjByName($o_IE, 'SUBMIT') _IEFormElementSetValue($Email, 'mail@coldmail.com') _IEFormElementSetValue($Pass, '1234') $Click.ScrollIntoView() Sleep(2000) $Click.click _IELoadWait($o_IE) Link to comment Share on other sites More sharing options...
Andy Posted February 24, 2009 Author Share Posted February 24, 2009 #include <IE.au3> Dim $o_IE = _IECreate('http://www.goarticles.com/ulogin.html') $Email = _IEGetObjByName($o_IE, 'email') $Pass = _IEGetObjByName($o_IE, 'password') $Click = _IEGetObjByName($o_IE, 'SUBMIT') _IEFormElementSetValue($Email, 'mail@coldmail.com') _IEFormElementSetValue($Pass, '1234') $Click.ScrollIntoView() Sleep(2000) $Click.click _IELoadWait($o_IE) I'm gonna go check that out now, cheers! I also found I could send the data using 'POST' which was quite useful. 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