On Tue, 19 Oct 2010 14:33:08 -0500, Arihan Sinha <arihan_sinha / yahoo.com> wrote in <2a812ccabfdd2779f7fd9b5b9874a7bc / ruby-forum.com>: >Charles Calvert wrote in post #955502: >> On Fri, 24 Sep 2010 05:05:24 -0500, Arihan Sinha >> <arihan_sinha / yahoo.com> wrote in >> <4dea75d148cec56675b28729009288b8 / ruby-forum.com>: >> >>>I am using the below code but it seems not working for IE. ( not sure). >>>Could anyone please help me how to delete the cache . >> >> [snip] >> >>> if @browser_name.to_s =~ /IE/ >>> puts "Test is running in window platform with browser IE" >>> puts >>>Dir.glob('/Users/'+ENV['USERNAME']+'/AppData/Local/Microsoft/Windows/Temporary >>>Internet Files/*') >>> FileUtils.rm_r >>>Dir.glob('/Users/'+ENV['USERNAME']+'/AppData/Local/Microsoft/Windows/Temporary >>>Internet Files/*'),:force => true >> >> It's a bad idea to delete the temporary files at the filesytem level >> like that. You could cause errors in the IE instance. Instead, Take >> a look at the Win32API functions that you can use for this: >> <http://msdn.microsoft.com/en-us/library/aa384026%28VS.85%29.aspx>. >> >> You can access these functions in Ruby using the Win32API library or >> the dl/win32 library, both of which are part of the Ruby stdlib. > >it seeems the whole delete_cache.rb is mentioned in this thread ( the >details code in the previous post) but its very confusing which method >need to call. So if you can highlight anything w.r.t that then it would >be great. You should look at the method main starting on line 122. That's the loop that you'll need to execute. BTW, some of the method names (e.g. get_first_info) leave something to be desired. If you're going to use this code, even just as an example, I'd rename those methods to something more descriptive. -- Charles Calvert Moderator - alt.computer.consultants.moderated Submission Address: accm / celticwolf.net Contact Address: accm_mod / celticwolf.net