jpadilla128 Posted October 6, 2010 Share Posted October 6, 2010 Hello all, I'm new to the tool so be easy on me. Can anyone help me out with my script where a scheduled job(running as System) will launch my AutoIt script (compiled as an .exe) to automatically login to a web page so that I can pre cache the web content for the user I am running it as? I am using the RunAs function to open a browser and then using keystrokes to log me in. Am I using the correct approach here? When looking at task manager, I can see that the "elearning" user is successfully launching IE but I am not seeing the browser cache getting populated in ..\local settings\temporary internet files\etc. etc. Here is the script: ; Launch the browser in context of the user Local $sUserName = "user" Local $sPassword = "password" Local $sDomain = "domain" RunAs($sUserName, $sDomain, $sPassword, 1, "C:\Program Files\Internet Explorer\iexplore.exe http://www.webpage.com") ; Wait for the browser to become active WinWaitActive("SumTotal - Log On") Sleep(10000) ; Enter login credentials Sleep(500) Send("username{TAB}") Send("password{ENTER}") Sleep(10000) ; Close the browser Send("!f") Send("x") Link to comment Share on other sites More sharing options...
trung0407 Posted October 7, 2010 Share Posted October 7, 2010 You didn't see that cache because it is downloaded to the temporary folder of the user $sUserName (since you logon under that name, that's what RunAs is for) \Documents & Settings\[username of the user who use internet]\temporary internet files... But it's not a good way to interact with IE with Send and Sleep. The best way is to create an IE object within a GUI to fully control all the elements on that website. Link to comment Share on other sites More sharing options...
jpadilla128 Posted October 7, 2010 Author Share Posted October 7, 2010 Yes I understand that. When I logoff my acccount and login as the account being called by the RunAs function, I don't see the cached content. Just to be clear, what I am attempting to do is create a scheduled job that will run in the background that will login at X intervals as a different user to login to a web page. Link to comment Share on other sites More sharing options...
trung0407 Posted October 7, 2010 Share Posted October 7, 2010 Cache has to be written somewhere. It doesn't just simply vanish. With FireFox, try to enter a page, on the address bar, enter about:cache, it will show you where your cache is located Sometime cache is stored in file *.cache, *.tmp and you didn't notice it. 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