views:

26

answers:

1

I'm running complex tests that create many cookies for different sections of my web site.

Occasionally I have to restart the browser in the middle a long test and since the Selenium server doesn't modify the base Firefox profile, the cookies evaporate.

Is there any way I can save all of the cookies to a Python variable before terminating the browser and restore them after starting a new browser instance?

A: 

Yes, sure. Look at getCookie, getCookieByName and createCookie methods.

SSH
the get_cookie method doesn't provide the path, domain, and expiry date for each cookie, so it isn't possible to fully restore those parameters with create_cookie.any other ideas?
Inshim