SpecFlowOSS / SpecFlow.Actions

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

Browserstack Driver not quitting after scenario #89

Closed tomrobinsonv closed 2 years ago

tomrobinsonv commented 2 years ago

Hello, I am trying to use Specflow Actions to run my tests but the drivers for every tests hang at the end and it takes upwards of a minute to timeout which will obviously prolong the test time quite a bit. As per the docs I assumed the driver being disposed of would be handled by the package just like starting but it just times out atm, as well as any attempt to manually quit the driver in a hook method for example doesn't work.

ACTUAL RESULT: Remote driver not being disposed of correctly, all tests timeout at the end instead of quitting and ending the test.

EXPECTED RESULT: At the end of the test, the driver should be disposed and not cause the test to timeout.

Package Versions: Selenium WebDriver - V3.141.0 SpecFlow.Actions.Browserstack - V0.1.322 Specflow- 3.9.74 Selenium.WebDriver.ChromeDriver -V101.0.4951.4100 Selenium.WebDriver.GeckoDriverr V-0.31.0 Selenium.WebDriver.IEDriver V4.0.0.1 Selenium.WebDriver.MSEdgeDrive - V100.0.1185.50

Logs

Message: OpenQA.Selenium.WebDriverTimeoutException : Timed out after 60 seconds ----> OpenQA.Selenium.NoSuchElementException : no such element: Unable to locate element: {"method":"css selector","selector":"#input"} (Session info: chrome=101.0.4951.41) TearDown : OpenQA.Selenium.WebDriverException : Session not started or terminated

Stack Trace: DefaultWait1.ThrowTimeoutException(String exceptionMessage, Exception lastException) DefaultWait1.Until[TResult](Func`2 condition) BrowserInteractions.WaitAndReturnElement(By elementLocator) BackgroundSteps.GivenMyRegistrationPlateCannotBeFound() line 33 BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments, TimeSpan& duration) TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance) TestExecutionEngine.OnAfterLastStep() TestRunner.CollectScenarioErrors() ManualVehicleSearchFeature_windows11_chrome.ScenarioCleanup()

<14 more frames...> RemoteWebDriver.ExecuteScriptCommand(String script, String commandName, Object[] args) RemoteWebDriver.ExecuteScript(String script, Object[] args) BrowserstackRuntimePlugin.RuntimePluginTestExecutionLifecycleEventEmitter_AfterScenario(Object sender, RuntimePluginAfterScenarioEventArgs e) RuntimePluginTestExecutionLifecycleEvents.RaiseAfterScenario(IObjectContainer objectContainer) RuntimePluginTestExecutionLifecycleEventEmitter.RaiseExecutionLifecycleEvent(HookType hookType, IObjectContainer container) TestExecutionEngine.FireEvents(HookType hookType) TestExecutionEngine.FireScenarioEvents(HookType bindingEvent) TestExecutionEngine.OnScenarioEnd() TestRunner.OnScenarioEnd() ManualVehicleSearchFeature_windows11_chrome.TestTearDown()