From 73e1c09bf9a085362a537187bc0f8b3ba5e2a7b4 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Fri, 12 Jun 2020 00:16:15 -0500 Subject: [PATCH] MQE-2144: Allure captures only steps when test fails with WebDriverCurlException suppressed exception generate allure correctly --- .../Extension/TestContextExtension.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php index 918bff47e..bc7cd5f62 100644 --- a/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php +++ b/src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php @@ -199,7 +199,11 @@ public function beforeStep(\Codeception\Event\StepEvent $e) */ public function afterStep(\Codeception\Event\StepEvent $e) { - $browserLog = $this->getDriver()->webDriver->manage()->getLog("browser"); + $browserLog = []; + try { + $browserLog = $this->getDriver()->webDriver->manage()->getLog("browser"); + } catch (\Exception $exception) { + } if (getenv('ENABLE_BROWSER_LOG') === 'true') { foreach (explode(',', getenv('BROWSER_LOG_BLACKLIST')) as $source) { $browserLog = BrowserLogUtil::filterLogsOfType($browserLog, $source);