路漫漫其修远兮,吾将上下而求索
Watir随笔(清除ie中cookies)
上一篇 /
下一篇 2010-08-03 11:07:33
/ 个人分类:Ruby_Watir
require 'watir'
require 'thread'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/cookiemanager'
include Watir
#clear the cookies
print Watir::CookieManager::WatirHelper.getSpecialFolderLocation(Watir::CookieManager::WatirHelper::COOKIES)
Watir::CookieManager::WatirHelper.deleteSpecialFolderContents(Watir::CookieManager::WatirHelper::COOKIES)
#clear the cathes
print Watir::CookieManager::WatirHelper.getSpecialFolderLocation(Watir::CookieManager::WatirHelper::INTERNET_CACHE)
Watir::CookieManager::WatirHelper.deleteSpecialFolderContents(Watir::CookieManager::WatirHelper::INTERNET_CACHE)
收藏
举报
TAG: