How to prevent Django from overriding sessionid cookie? How to prevent Django from overriding sessionid cookie? selenium selenium

How to prevent Django from overriding sessionid cookie?


I believe things are working just like they are supposed to. That is, sessions should be shared across tabs and/or windows, not across browsers.

Looking at your code it seems you are not intending to share sessions across browsers, just across two firefox windows. Instantiating two WebDriver classes is not the way you ought to be working.Have a look at the selenium source code, firefox.WebDriver inherits from remote.WebDriver, which has methods to switch tabs and/or windows (e.g. line 490).

You should set the browser as a class variable and open windows or tabs from it accordingly.