Skip to content

Commit ec9c4d3

Browse files
authored
MQE-2144: Allure captures only <after> steps when test fails with WebDriverCurlException (#738)
suppressed exception generate allure correctly
1 parent bd2eee2 commit ec9c4d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ public function beforeStep(\Codeception\Event\StepEvent $e)
199199
*/
200200
public function afterStep(\Codeception\Event\StepEvent $e)
201201
{
202-
$browserLog = $this->getDriver()->webDriver->manage()->getLog("browser");
202+
$browserLog = [];
203+
try {
204+
$browserLog = $this->getDriver()->webDriver->manage()->getLog("browser");
205+
} catch (\Exception $exception) {
206+
}
203207
if (getenv('ENABLE_BROWSER_LOG') === 'true') {
204208
foreach (explode(',', getenv('BROWSER_LOG_BLOCKLIST')) as $source) {
205209
$browserLog = BrowserLogUtil::filterLogsOfType($browserLog, $source);

0 commit comments

Comments
 (0)