From c319664a86335fa3a226fa49433cc59381654fee Mon Sep 17 00:00:00 2001 From: Andrejs Stepanovs Date: Thu, 25 Feb 2021 16:48:24 +0100 Subject: [PATCH] Do not add chromeOptions to IE capabilities --- src/FacebookFactory.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/FacebookFactory.php b/src/FacebookFactory.php index 73324b3f..9aab43f1 100644 --- a/src/FacebookFactory.php +++ b/src/FacebookFactory.php @@ -39,10 +39,12 @@ public function buildDriver(array $config) unset($config['capabilities']['extra_capabilities']); // PATCH: Disable W3C mode in chromedriver until we have capacity to actively adopt it - $extraCapabilities['chromeOptions'] = array_merge( - isset($extraCapabilities['chromeOptions']) ? $extraCapabilities['chromeOptions'] : [], - ['w3c' => false] - ); + if (!empty($config['capabilities']['browser']) && $config['capabilities']['browser'] != WebDriverBrowserType::IE) { + $extraCapabilities['chromeOptions'] = array_merge( + isset($extraCapabilities['chromeOptions']) ? $extraCapabilities['chromeOptions'] : [], + ['w3c' => false] + ); + } $capabilities = array_replace($this->guessCapabilities(), $extraCapabilities, $config['capabilities']);