Hi,

The below code executes without any error. But Nothing happens in

C:\Documents and Settings\raveendran\Local Settings\Temporary Internet Files


Awaiting your reply



On Fri, May 16, 2008 at 6:19 PM, Moochie <dduph...@redbrickhealth.com>wrote:

>
> # Purpose:  To delete all cookies on the PC
> # Date: Feb 07, 2008
>
> #create Class Called Dir
> class Dir
>    #Require 'find.rb'
>    require 'find'
>    #creates Path Variable
>    path = "C:\\Documents and Settings\\"+ENV['USERNAME']+"\\Local
> Settings\\Temporary Internet Files"
>
>    def Dir.visit(dir = '.', files_first = false, &block)
>        if files_first
>            paths = []
>            Find.find(dir) { |path| paths << path }
>            paths.reverse_each {|path| yield path}
>        else
>            Find.find(dir, &block)
>        end
>    end
>    # -simulates unix rm -rf command
>    def Dir.rm_rf(dir)
>
>        Dir.visit(dir, true) do |path|
>            if FileTest.directory?(path)
>                begin
>                    Dir.unlink(path)
>                rescue # -Security Exception for Content.IE
>                end
>            else
>                #puts "removing #{ path }"
>                begin
>                    File.unlink(path)
>                rescue => e #-Security exception index.dat etc.
>                    #puts "Exception " + e
>                end
>            end
>        end
>    end
>  end
>
> class CookieKiller
>    def self.kill()
>      dir =CookieKiller.cookie_dir()
>      Dir.rm_rf( dir)
>    end
>    def self.cookie_dir()
>      path = "C:\\Documents and Settings\\"+ENV['USERNAME']+"\\Local
> Settings\\Temporary Internet Files"
>      return path
>    end
>
>  end
>
> #Delete Cookies
> CookieKiller.kill()
>
>
>
>
> On May 16, 6:25 am, "aidy lewis" <aidy.le...@googlemail.com> wrote:
> > Hi,
> >
> > Does anyone know how to delete all cookies in Ruby?
> >
> > --
> > Aidywww.agiletester.co.uk
> >
>


-- 
Regards,
P.Raveendran

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to