SpecFlowOSS / SpecFlow.Actions

BSD 3-Clause "New" or "Revised" License
57 stars 53 forks source link

Incompatibility with latest Selenium #125

Open pbeckmannCE opened 1 year ago

pbeckmannCE commented 1 year ago

Hi there, we are using SpecFlow and Selenium for our tests on Chrome under .NET 6. We planned updating Chrome from 111 to 114, which means we also had to update Selenium, especially WebDriver. Unfortunately we ran into an error:

System.MissingMethodException : Method not found: 'Void OpenQA.Selenium.DriverOptions.AddAdditionalCapability(System.String, System.Object)'.
   at SpecFlow.Actions.Selenium.DriverInitialisers.DriverOptionsHelper.TryToAddArguments[T](T options, String[] arguments)
   at SpecFlow.Actions.Selenium.DriverInitialisers.DriverInitialiser`1.AddArgumentsFromConfiguration(T options)
   at SpecFlow.Actions.Selenium.DriverInitialisers.DriverInitialiser`1.CreateOptions()
   at SpecFlow.Actions.Selenium.DriverInitialisers.DriverInitialiser`1.Initialise()
   at SpecFlow.Actions.Selenium.BrowserDriver.CreateWebDriver()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at SpecFlow.Actions.Selenium.BrowserDriver.get_Current()
   at SpecFlow.Actions.Selenium.BrowserInteractions.GoToUrl(String url)

It looks like the method was removed from Selenium, as it was deprecated, but latest version of SpecFlow.Actions still calls it. Although I have to admit that it's unclear why the method is called, as our test is specified to run for Chrome and AddAdditionalCapability() gets called only for Edge, IE and Safari.