I'm writing a script which needs the browser that selenium is operating close and re-open, without losing its cookies.
Any idea on how to go about it?
Basically, it's a check to see that if the user opens and closes his browser, his cookies stay intact.
This is a feature of the browser and not your concern: If there is a bug in the browser, then there is little you can do. If you need to know whether a certain version of the browser works correctly, then define a manual test (write a document that explains the steps), do it once and record the result somewhere (like "Browser XXX version YYY works").
When you know that a certain browser (version) works, then that's not going to change, so there is no need to repeat the test.
Close and open a new browser in Selenium