DarkOnyx Posted December 23, 2014 Share Posted December 23, 2014 Hi all, I saw this example here and it works pretty well:http://stackoverflow.com/questions/15052540/autoit-how-can-i-write-in-an-input-field-on-a-browser I've played with this for hours. I can't seem to open a new window (in a new tab) and have it do the same thing. I am drawing a total blank. What I am trying to do is open several windows in new tabs and enter the userID and password in the given field without it giving me errors. Simple delays are too clumsy. Any ideas? Link to comment Share on other sites More sharing options...
Danp2 Posted December 23, 2014 Share Posted December 23, 2014 Any ideas? Yes... post your code. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 23, 2014 Moderators Share Posted December 23, 2014 I just added a tab create feature for IE here: _IEJS_TabCreate() DarkOnyx 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
DarkOnyx Posted December 24, 2014 Author Share Posted December 24, 2014 Sure, the code is the one from the link I referenced:#include<IE.au3> $sUsername = "Username" $sPassword = "Password" $sUrl = "https://yoururl.com" $oIE = _IECreate($sUrl, 0, 1, 0, 1) Sleep(2000) $oHWND = _IEPropertyGet($oIE, "hwnd") WinSetState($oHWND, "", @SW_MAXIMIZE) $oForm = _IEFormGetCollection($oIE, 0) $oUsername = _IEFormElementGetObjByName($oForm, 'login') ; change name ! $oPassword = _IEFormElementGetObjByName($oForm, "password") ; change name ! _IEFormElementSetValue($oUsername, $sUsername) _IEFormElementSetValue($oPassword, $sPassword) _IEFormSubmit($oForm) Thanks for the function Smoke, I'll play around with it. Link to comment Share on other sites More sharing options...
DarkOnyx Posted December 28, 2014 Author Share Posted December 28, 2014 Smoke, THANK YOU SO MUCH FOR YOUR LIBRARY! Just what the doctor ordered. I made some tweaks on my code and now it works fantastically. 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