Skip to content

Commit 5ae0ed2

Browse files
author
RayRom
authored
Merge pull request #20 from Travelport-Czech/patch7
Remove one second waiting in hidding elements
2 parents e73cb64 + c2e87d8 commit 5ae0ed2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

module/VisualCeption.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,9 @@ private function hideElementsForScreenshot(array $excludeElements)
380380
foreach ($excludeElements as $element) {
381381
$this->hideElement($element);
382382
}
383-
$this->webDriverModule->wait(1);
383+
if (!empty($excludeElements)) {
384+
$this->webDriverModule->waitForElementNotVisible(array_pop($excludeElements));
385+
}
384386
}
385387

386388
/**
@@ -393,7 +395,9 @@ private function resetHideElementsForScreenshot(array $excludeElements)
393395
foreach ($excludeElements as $element) {
394396
$this->showElement($element);
395397
}
396-
$this->webDriverModule->wait(1);
398+
if (!empty($excludeElements)) {
399+
$this->webDriverModule->waitForElementVisible(array_pop($excludeElements));
400+
}
397401
}
398402

399403
/**

0 commit comments

Comments
 (0)