Session is persisted between scenario (and feature for certain use case) using webdriver

1,613 views
Skip to first unread message

Thibaud Lepretre

unread,
Mar 29, 2013, 6:28:25 AM3/29/13
to be...@googlegroups.com
Hi,

I have two configurations: one using Selenium2 (firefox) and the other phantomJS (webdriver).
But I have strange behavior...

When I'm using Selenium2 with Firefox:

java -jar selenium-server-standalone-2.31.0.jar

Sessions/cookies are persisted between scenario. I can check that because one the second scenario the auth is already done, so client had a cookie...

Moreover when I'm using Selenium2 with phantomJS

phantomjs  --webdriver=8643 --ignore-ssl-errors=yes

Sessions/cookies are all time persisted until I restart phantomjs server...

Someone have this kind of issue?

Thanks,
Thibaud

Konstantin Kudryashov

unread,
Mar 29, 2013, 8:29:01 AM3/29/13
to be...@googlegroups.com

Konstantin Kudryashov
--- PHP developer, BDD evangelist, Scrum master

a: http://about.me/everzet
b: http://everzet.com
c: https://github.com/everzet

--
You received this message because you are subscribed to the Google Groups "Behat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behat+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thibaud Lepretre

unread,
Mar 29, 2013, 11:33:36 AM3/29/13
to be...@googlegroups.com
From documentation (http://docs.behat.org/cookbook/behat_and_mink.html)

Context isolation is a very important thing in functional tests. But restarting the browser after each scenario could slow down your feature suite very much. So by default, Mink tries hard to reset your browser session without reloading it (cleans all domain cookies).

So I though It is a default behavior and I don't need to implem reset() function.

kenden

unread,
Apr 16, 2014, 10:51:29 AM4/16/14
to be...@googlegroups.com
I am having the same issue, the session is persisted for the duration of running the whole suite.

I am confused, as most people seem to be having the opposite problem:
http://stackoverflow.com/questions/19050988/maintaining-the-the-session-between-scenarios-in-a-single-feature-file-in-behat

I created a bug for this:
https://github.com/Behat/Mink/issues/496

Konstantin Kudryashov

unread,
Apr 16, 2014, 1:37:11 PM4/16/14
to be...@googlegroups.com
Try to tag your scenario with @insulated tag
--
You received this message because you are subscribed to the Google Groups "Behat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behat+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

---

Konstantin Kudryashov

--- PHP developer, BDD evangelist, Scrum master

Reply all
Reply to author
Forward
0 new messages