Remove empty chrome prefs from the capabilities

This commit is contained in:
Christophe Coevoet
2022-03-30 12:32:29 +02:00
parent 8a96a79972
commit 015dcafdbd

View File

@@ -152,6 +152,15 @@ class Selenium2Factory implements DriverFactory
->prototype('variable')->end()
->end()
->end()
->validate()
->ifTrue(function ($v) {
return empty($v['prefs']);
})
->then(function ($v) {
unset($v['prefs']);
return $v;
})
->end()
->end()
->arrayNode('extra_capabilities')
->info('Custom capabilities merged with the known ones')