Closed phsultan closed 5 years ago
As fas as I am aware, desiredCapabilities
is no longer supposed to be sent as part of the session request, according to the W3C spec, but it is still sent due to backwards compatibility reasons and should probably be omitted in the case of standalone Geckodriver usage. However, it is more common I believe for Geckodriver to be used through Selenium still.
The spec that we are trying to follow is the official W3C and that one is not very clear on the usage of firstMatch and alwaysMatch.
This issue has been automatically marked as stale because it has not had any recent activity. If possible, please retry using the latest Nightwatch version and update the issue with any relevant details. If no further activity occurs, it will be closed. Thank you for your contribution.
Hello,
When configured to manage a Firefox instance directly, Nightwatch sends both
desiredCapabilities
andcapabilities
in the initialPOST /session
request, andcapabilities
gets the preference then.However, it looks malformed according to the spec as it does not contain neither a
firstMatch
array nor aalwaysMatch
property.In my case, this results in having options not being passed, like
acceptInsecureCerts
in the example below.Command
Configuration file
The issue has been introduced with version
1.0.15
, and there are multiple ways to fix. This patch fixescapabilities
by inserting analwaysMatch
property, that matches withdesiredCapabilities
(without theacceptSslCerts
,javascriptEnabled
,name
,nativeEvents
properties that Geckodriver rejects).Not sure if sending both
capabilities
anddesiredCapabilities
is something that's targetted too, we can also think of removingcapabilities
completely to fix this, and maybe to build it usingfirstMatch
rather thanalwaysMatch
. Many options on the table here, if that helps, I can work on a PR.Thanks!