Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to highlight reset limitation in Selenium #51

Open
j4m3s opened this issue Feb 12, 2015 · 4 comments
Open

Update docs to highlight reset limitation in Selenium #51

j4m3s opened this issue Feb 12, 2015 · 4 comments

Comments

@j4m3s
Copy link

j4m3s commented Feb 12, 2015

I've come across a Selenium cookie clearance limitation (leading to session 'bleed' if a scenario ends on a different domain): minkphp/Mink#642

Please can you include this limitation in the updated docs? I had the impression that scenarios were isolated so it was a surprise when we found this particular case.

@aik099
Copy link
Member

aik099 commented Feb 12, 2015

More details:

When script that was using Mink opens pages from different domains and sets cookies on both of them, then calling Session::reset() would only remove cookies from domain belonging to currently opened page.

In general some drivers doesn't allow setting/removing cookies from other than current domain. To get cross-driver consistent behavior the drivers that can manage cookies on different domains, like Zombie, were restricted to current domain only as well.

@stof
Copy link
Member

stof commented Feb 12, 2015

@aik099 note that ZombieDriver resets all cookies properly on reset (the goal for reset is to do the best resetting possible, not to implement the common denominator). So this limitation is only for Selenium, Selenium2 and Sahi.

@j4m3s if you want to contribute, this should probably be documented in https://github.com/minkphp/docs/blob/master/guides/session.rst#resetting-the-session

@j4m3s
Copy link
Author

j4m3s commented Feb 23, 2015

@stof am I right in thinking that scenarios are "soft isolated" by default (i.e. session is reset so cookies are cleared etc)?

My experience with phantomjs suggests not (see also this SO post from someone a while back: http://stackoverflow.com/questions/17279478/when-running-a-behat-login-test-through-phantomjs-it-only-passes-on-the-first-ru) - but I know selenium and Goutte do. I'm trying to find my feet before doing any documentation updating!

@stof
Copy link
Member

stof commented Feb 24, 2015

@j4m3s yes, it is the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants