You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the desired capabilities array/object is built from these sources (in a given order):
WebDriver (external library) browser-specific defaults (WebdriverClassicDriver::getBrowserSpecificCapabilities), which do no harm currently because they set only browserName and platform keys in the final array:
case WebDriverBrowserType::CHROME:
case WebDriverBrowserType::GOOGLECHROME:
return DesiredCapabilities::chrome();
driver-specific browser-agnostic defaults from WebdriverClassicDriver::DEFAULT_CAPABILITIES['default'] public constant
driver-specific & browser-specific defaults from WebdriverClassicDriver::DEFAULT_CAPABILITIES['{normalized browser name}'] public constant
WebDriverBrowserType::CHROME => [
'goog:chromeOptions' => [
// disable"Chrome is being controlled.."notificationbar'excludeSwitches' => ['enable-automation'],
'args' => array(
// disable browser folder cloning on Mac,when tests are executed'disable-features=MacAppCodeSignClone', // From https://github.com/minkphp/webdriver-classic-driver/pull/53 (to be merged)
),
],
],
...
Such an approach has an implementation bug that prevents WebDriver (external library) browser-specific defaults defined capabilities from being overwritten (the browserName and the platform in this case), which is addressed in #51.
P.S.
The MinkSelenium2Drver has 2 desired capability defaults: browserName and name. Therefore such a problem doesn't have such an impact there.
Problem 1
No support for nested array merging. For example, I want to keep the goog:chromeOptions array from driver-specific & browser-specific defaults but only add a binary sub-key to it. I can't and I have to redefine all of it.
Problem 2
No meta capabilities support. For example, to enable headless testing in different browsers we need to specify different sets of desired capabilities. We want to make it easier for developers to enable this.
Ability to exclude default desired capability defaults (or parts of them) from final desired capabilities array. We do try to provide sensible defaults, but as @oleg-andreyev mentioned in the #53 (comment) that might not be sensible enough for all users.
Solutions (I'm open to suggestions):
Support mink:browserOptions (or any non-standard key), that inside would have feature flags (maybe parametrized as well) that would impact how final array is built.
Possible options:
use_web_driver_defaults => true // default value
use_mink_driver_defaults => true // default value
width => 123
height => 456
headless => true
...
The goog:chromeOptions.args key needs special handling, because you can have arguments, that have a comma-separated list of values (e.g. disable-features=MacAppCodeSignClone,...) in defaults and the developer might want to add-up/remove-from them.
P.S.
This issue is created to avoid much offtopic in the #53 .
The text was updated successfully, but these errors were encountered:
Current implementation
Currently, the desired capabilities array/object is built from these sources (in a given order):
WebdriverClassicDriver::getBrowserSpecificCapabilities
), which do no harm currently because they set onlybrowserName
andplatform
keys in the final array:WebdriverClassicDriver::DEFAULT_CAPABILITIES['default']
public constantWebdriverClassicDriver::DEFAULT_CAPABILITIES['{normalized browser name}']
public constantSuch an approach has an implementation bug that prevents
WebDriver (external library) browser-specific defaults
defined capabilities from being overwritten (thebrowserName
and theplatform
in this case), which is addressed in #51.P.S.
The
MinkSelenium2Drver
has 2 desired capability defaults:browserName
andname
. Therefore such a problem doesn't have such an impact there.Problem 1
No support for nested array merging. For example, I want to keep the
goog:chromeOptions
array from driver-specific & browser-specific defaults but only adda binary
sub-key to it. I can't and I have to redefine all of it.Problem 2
No meta capabilities support. For example, to enable headless testing in different browsers we need to specify different sets of desired capabilities. We want to make it easier for developers to enable this.
Problem 3
Ability to exclude default desired capability defaults (or parts of them) from final desired capabilities array. We do try to provide sensible defaults, but as @oleg-andreyev mentioned in the #53 (comment) that might not be sensible enough for all users.
Solutions (I'm open to suggestions):
Support
mink:browserOptions
(or any non-standard key), that inside would have feature flags (maybe parametrized as well) that would impact how final array is built.Possible options:
The
goog:chromeOptions.args
key needs special handling, because you can have arguments, that have a comma-separated list of values (e.g.disable-features=MacAppCodeSignClone,...
) in defaults and the developer might want to add-up/remove-from them.P.S.
This issue is created to avoid much offtopic in the #53 .
The text was updated successfully, but these errors were encountered: