0

No overload for method 'AddAdditionalCapability' takes 3 argument

case BrowserType.Edge:
EdgeOptions edgeOptions = new EdgeOptions();
edgeOptions.AddAdditionalCapability("cloud:URL", "https://someone_jPLy2u:RaH4Q6U4zkmZYdn7qspW@hub-cloud.browserstack.com/wd/hub", true);
edgeOptions.AddAdditionalCapability("os", "Windows", true);
edgeOptions.AddAdditionalCapability("os_version", "10", true);
edgeOptions.AddAdditionalCapability("browser_version", browserVersion, true);
this.webDriver = new EdgeDriver(edgeOptions: edgeOptions, token: "something");
this.reporter = ((EdgeDriver)webDriver).Report();
                  
this.reporter.DisableCommandReports(DriverCommandsFilter.Passing)

This works for the rest of the browsers except for edge

cruisepandey
  • 28,520
  • 6
  • 20
  • 38
  • Hi, may I know if you have got any chance to check my answer? Is [my answer](https://stackoverflow.com/questions/68769889/add-additional-capability-doesnt-work-for-edge/68798372#68798372) below helpful to deal with the issue? – Yu Zhou Aug 18 '21 at 02:56

1 Answers1

0

Yes, AddAdditionalCapability for EdgeOptions doesn't have overload with 3 arguments and the Selenium team won't add a three-argument overload in the future. For the detailed information, you can refer to this link.

Selenium team is planning to return the method to its original name in a future revision. I assume that you're using Selenium 3 and I suggest that you use a newer version Selenium 4. Starting from version 4.0, AddAdditionalCapability is deprecated and you can use AddAdditionalOption(name, capabilityValue) and the capability will be global.

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22