Wendallwoof Posted May 26, 2015 Share Posted May 26, 2015 Hi all, I've created a script to rotate between browser pages and a local app and all is working dandy. I am however having difficulties with submitting the page data. Where the username and email field can be handled via _IEGetObjByName, the submit button doesn't have an elementID that I can use:<button class="btn blue form-login full-width" type="submit" tabindex="3">Login</button> I've tried to use _IEFormSubmit and tried tab to the index but not having much luck. Can anyone advise on a way to approach this?I'm happy with how to use the co-ordinates approach and clicking on the button but don't feel this is viable long term.... Script below: #include <IE.au3>Local $dropTask = _IECreate("DropTask.com/login")$dropTaskHandle = _IEPropertyGet($dropTask, "hwnd") ; Get Handle of the IE windowWinSetState($dropTaskHandle, "", @SW_MAXIMIZE)$dropTaskUsername = _IEGetObjByName($dropTask, "email")_IEFormElementSetValue($dropTaskUsername, "email@email.co.uk)$dropTaskPassword = _IEGetObjByName($dropTask, "password")_IEFormElementSetValue ($dropTaskPassword, "Password123"); submit form code needs to go here Sleep(30000)WinSetState($dropTaskHandle, "", @SW_HIDE); other code omitted as not relevant Cheers,Wendalllllllllllllllllllllllllllllll woof. Link to comment Share on other sites More sharing options...
Wendallwoof Posted May 28, 2015 Author Share Posted May 28, 2015 Any pointers to documentation would be great too, please note I am not a programmer! (Complete novice) Link to comment Share on other sites More sharing options...
trancexx Posted May 28, 2015 Share Posted May 28, 2015 Do you need browser showing? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Danp2 Posted May 28, 2015 Share Posted May 28, 2015 Did you try:$oForm = _IEFormGetCollection($oIE, 0) ; get first form _IEFormSubmit($oForm) Wendallwoof 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Wendallwoof Posted May 29, 2015 Author Share Posted May 29, 2015 Thanks, works a treat! 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