Using permanent profiles and cookies in Selenium

北战南征 提交于 2021-01-07 03:09:12

问题


I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out this answer, but it's using Java and I need it with Python. It doesn't matter if I use Chrome or Firefox, but the best is to have permanent profiles and cookies with both of them. Is it possible?

来源:https://stackoverflow.com/questions/63901136/using-permanent-profiles-and-cookies-in-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!