New cookies not written to directory specified in -firefoxProfileTemplate

61 views
Skip to first unread message

Disco Babu

unread,
Mar 9, 2011, 6:59:10 AM3/9/11
to Selenium Users
Hey,
When testing with Firefor3.6 and Windows 7, I have noticed that if a
cookie is written by the Selenium testcase, it is not written to
cookies.sqlite file in the directory specified in the -
firefoxProfileTemplate directory, for example C:/profile

It is rather written to the cookies.sqlite file in a temporary
directory, for example C:\Documents and Settings\testuser\Application
Data\Mozilla\Firefox\Profiles\va74hr65.default

The profile from the -firefoxProfileTemplate directory is however
correctly used. Is this an expected/design intent situation or is
there a way to work around this?

Much thanks for any feedback,
Prashant

BillR

unread,
Mar 9, 2011, 1:38:53 PM3/9/11
to Selenium Users
My impression is that the firefoxProfileTemplate directory is copied
and the temp copy is what is used. I'm not sure how to work around
this, except if you can read cookies from the temp cookies.sqlite file
and write them to the other one after your test ends. Or (assuming
this isn't already a provided option) you could change the code to not
do the copy. But then you'd have to consider that your test was not
starting from a known state.

Ross Patterson

unread,
Mar 9, 2011, 2:00:40 PM3/9/11
to seleniu...@googlegroups.com
Your impression is correct. It is also almost always the right thing to do. It's a bad idea for cookies from one test to affect another test - tests should not be interdependent.

Ross

Reply all
Reply to author
Forward
0 new messages