I\'m surprised there didn\'t seem to be much discussion on this.
in Mechanize I can easily read an entire cookie jar from the browser, store it to a file, and load it in
browser = Watir::Browser.new :firefox
browser.goto 'http://google.com'
# save cookies
saved_cookies = browser.cookies.to_a
# clear and get new cookies
browser.cookies.clear
browser.goto 'http://google.com'
# set new cookies
browser.cookies.clear
saved_cookies.each do |saved_cookie|
browser.cookies.add(saved_cookie[:name], saved_cookie[:value])
end