Only set "marionette" capability for false case
Starting with Geckodriver 0.16, the marionette capability is not
recognized as valid, and will not create a session if it's specified.
@@ -305,8 +305,6 @@ public void AddAdditionalCapability(string capabilityName, object capabilityValu
public override ICapabilities ToCapabilities()
{
DesiredCapabilities capabilities = DesiredCapabilities.Firefox();
- capabilities.SetCapability(IsMarionetteCapability, this.isMarionette);
-
if (this.isMarionette)
{
Dictionary<string, object> firefoxOptions = this.GenerateFirefoxOptionsDictionary();
@@ -314,6 +312,7 @@ public override ICapabilities ToCapabilities()
}
else
{
+ capabilities.SetCapability(IsMarionetteCapability, this.isMarionette);
if (this.profile != null)
{
capabilities.SetCapability(FirefoxProfileCapability, this.profile.ToBase64String());
