Hi All,

I am using below package.

Watir version - 1.6.2
Ruby version - 1.8.6

I was using IE 6 without any issues, where i used below code to clear
cookies and cache memory.

require 'watir/ie'
require 'watir/testcase'
require 'watir/cookiemanager'
require 'watir\contrib\enabled_popup'
require 'watir/winClicker'
require 'time'
require 'win32/clipboard'
include Win32

Watir::CookieManager::WatirHelper.deleteSpecialFolderContents
(Watir::CookieManager::WatirHelper::COOKIES)
Watir::CookieManager::WatirHelper.deleteSpecialFolderContents
(Watir::CookieManager::WatirHelper::INTERNET_CACHE)

Above code worked well and i didn't face any issues. I installed IE 7
before two weeks and the same code is not working it doesn't throw any
error at the same time it don't delete any files in the temporary
folder. I ran the above snippet in IRB , it shows the list of deleted
files but it didn't delete any files.


After a long search i found an another snippet from below link

http://rubyforge.org/snippet/detail.php?type=snippet&id=26

That snippet works good. But as i am a newbie of ruby i am not able to
include that snippet in Watir script.
So i created one external ruby file of ClearCookiesCache.rb  i stored
in the same watir folder and i called in my watir script by using
below code.


require 'watir/ie'
require 'watir/testcase'
require 'watir\contrib\enabled_popup'
require 'watir/winClicker'
require 'time'
require 'win32/clipboard'
require 'ClearCookiesCache'
include Win32
load 'ClearCookiesCache.rb'

But it shows below warning and doesn't do anything.

"./ClearCookiesCache.rb:86: warning: already initialized constant
FUNCS"

I am running a bunch of test scripts and am creating more than 200 IE
instances in the batch running.
So I have to clear the cookies and cache at the end of every instances
otherwise my tests will fail, so experts please take a look on my
below issues.

I need some advice on below areas,

1, how to clear cookies and cache?
2, how to call other ruby scripts in watir?
3, how to avoid "already initialized constant" errors?


Thanks,

Prince3105



--~--~---------~--~----~------------~-------~--~----~
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