-
Notifications
You must be signed in to change notification settings - Fork 270
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
Shared session not stopped after last test for browser - using multible browsers #352
Comments
change suggestion for Selenium2TestCase.php: public function tearDown()
{
parent::tearDown();
if ($this->getName() === $this->getLastTest()) {
$this->stop();
}
}
function getLastTest()
{
$tests = array_filter(get_class_methods($this), function($method){
$reClassName = "/test[A-Z][a-zA-Z]+/";
preg_match($reClassName, $method, $matchClassName);
$reAnnotation = "/@test/";
$rm = new \ReflectionMethod($this, $method);
$docComment = $rm->getDocComment();
preg_match($reAnnotation, $docComment, $matchAnnotation);
return(!empty($matchClassName) || !empty($matchAnnotation));
});
return end($tests);
} When I have time , I'm going to create a pull request for this. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run my test with multible browsers ($browsers array) and session strategy shared, the session of the first browser don't stop after the last test. Until timeout the next session for the next browsers starts.
It would be nice, if until the last test for one browser session, the session would be stopped.
The text was updated successfully, but these errors were encountered: