Open zerkms opened 11 years ago
Should be nice for performance, but have you located the reason why the current policy (opening a new session) fails?
@giorgiosironi,
yep - the current implementation invokes
$this->session->window($this->mainWindow);
for every test run (except of first), assuming there is a mainWindow
. But as long as we closed it - there is no one, thus we get an exception.
I will merge a smarter solution than the current one. Take a loot at the existing tests too (if there are any at the unit or end-to-end level) too to see if they need to be updated.
@giorgiosironi,
"Take a loot" --- do like!
Oops :) "look"
@zerkms I have added new changes in #195 , is this variant ok?
@emaks, I will try to look later, don't have much time now, sorry
Now if you
closeWindow()
in the end of the test method (sometimes it's a test scenario, like in my case) then you'll see the next test method is failed with the exceptionor
(it's driver dependent)
How about resurrecting the browser in
PHPUnit_Extensions_Selenium2TestCase_SessionStrategy_Shared::session()
in case if it was closed?I see the implementation to look like
What do you think?
If you think it makes sense - I'll cover this solution with tests and send PR.