From 0af0cbe549365a577ea5e9e1dd17a207198057eb Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 1 Dec 2021 12:47:13 +0800 Subject: [PATCH] Marionette capability should be optional The marionette capability is a Firefox-specific capability to aid in the transition from legacy versions of Firefox (47.0.1 and earlier). It is a `Boolean` and this value is now checked aggressively in Selenium 4.0.0 onwards. Since `null` is not a Boolean, this leads to an error. This patch removes the default value, which means that if no value is specified then it will not be included in the output, and the defaults will apply (True for Firefox; Unset for other browsers). Without this patch you must jump through hoops to run against Selenium 4. Fixes #376 --- .../MinkExtension/ServiceContainer/Driver/Selenium2Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php index fcdcebaf..0e645d15 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/Selenium2Factory.php @@ -98,7 +98,7 @@ protected function getCapabilitiesNode() ->scalarNode('platform')->end() ->scalarNode('browserVersion')->end() ->scalarNode('browser')->defaultValue('firefox')->end() - ->booleanNode('marionette')->defaultNull()->end() + ->booleanNode('marionette')->end() ->booleanNode('ignoreZoomSetting')->defaultFalse()->end() ->scalarNode('name')->defaultValue('Behat feature suite')->end() ->scalarNode('deviceOrientation')->end()