why selenium with python open one url, doesnot have any cookie
I need the cookie to login
niQo_ joined the channel
niQo_ has quit
niQo_ joined the channel
AutomatedTester
SimpleName: what do you mean?
SimpleName
AutomatedTester: I use this https://dpaste.de/c9dU code open new browser, but there is no cookie
if I open one browser mannually, everything is ok
rvisa joined the channel
Mayestril has quit
niQo_ has quit
barancev
SimpleName: selenium creates a new clean profile to run a browser
AutomatedTester
SimpleName: yea, as barancev says, we start with a clean profile to give you a clean and constant start for tests
SimpleName
barancev: but even use a new clean profile, I see the settings is not disable cookie
AutomatedTester
SimpleName: why would we want to disable cookies?
barancev
SimpleName: a new clean profile contains no preset cookies
AutomatedTester
if you want that you would need to use the profile class to tweak browser to block cookies
barancev
they are not disabled, but you have to perform login etc as if you started a browser first time
dcypherthis-sl joined the channel
dcypherthis-sl
that is by design :slightly_smiling_face:
if you're cookie is still valid you could store it and then spoof it, otherwise, you might just want to wrap your login steps in a page object method and call that before each spec
SimpleName
barancev: I know, may you are not understand what I said, I http request one url, there must be have some cookie( it’s not for login, it’s the csrf cookie)