Skip to content

Commit

Permalink
Fixed "No Session Timeout" fatal error in WebDriver (Codeception#5070)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik authored Jul 11, 2018
1 parent 51b8cba commit 392b7e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Codeception/Module/WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 507,12 @@ public function _after(TestInterface $test)
return;
}
if ($this->config['clear_cookies'] && isset($this->webDriver)) {
$this->webDriver->manage()->deleteAllCookies();
try {
$this->webDriver->manage()->deleteAllCookies();
} catch (\Exception $e) {
// may cause fatal errors when not handled
$this->debug("Error, can't clean cookies after a test: " . $e->getMessage());
}
}
}

Expand Down

0 comments on commit 392b7e4

Please sign in to comment.