Skip to content

Commit

Permalink
fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Drumev committed Sep 26, 2024
1 parent 95aa119 commit 4fe5234
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Codeception/Module/VisualCeption.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ private function compareVisualChanges($identifier, $elementID, $excludeElements,
$timeout = 15;

while ($outOfMaxDeviation) {
if((time() - $startTime) > $timeout){
throw new \Exception("Screenshots comparison failed after timeout - $timeout seconds");
$currentTime = time() - $startTime;

if($currentTime > $timeout){
throw new \Exception("Screenshots comparison failed after $currentTime seconds");
}

$deviationResult = $this->getDeviation($identifier, $elementID, $fullScreenshot, $excludeElements);
Expand Down

0 comments on commit 4fe5234

Please sign in to comment.