Capgemini / powerapps-specflow-bindings

A SpecFlow bindings library for model-driven Power Apps.
MIT License
42 stars 28 forks source link

test: `EntitySubGridStepsFeature.SwitchSubgridView` failing #137

Open tdashworth opened 2 years ago

tdashworth commented 2 years ago

Describe the bug

The above test is failing for the following error:

Test method Capgemini.PowerApps.SpecFlowBindings.UiTests.EntitySubGridStepsFeature.SwitchSubgridView threw exception:
OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":".//div[@class='ag-center-cols-viewport']//div[@role='rowgroup']"}
(Session info: headless chrome=105.0.5195.102)
   at Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand`1.Execute[T1,T2,T3,T4,T5,T6,T7,T8,T9](IWebDriver driver, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9)
   at Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand`1.Execute(IWebDriver driver)
   at Microsoft.Dynamics365.UIAutomation.Browser.BrowserPage.Execute[TResult](BrowserCommandOptions options, Func`2 delegate)
   at Microsoft.Dynamics365.UIAutomation.Api.UCI.SubGrid.GetSubGridItemsCount(String subgridName)
   at Capgemini.PowerApps.SpecFlowBindings.Steps.EntitySubGridSteps.ThenICanSeeRecordsInTheSubgrid(String compare, Int32 count, String subGridName) in \bindings\src\Capgemini.PowerApps.SpecFlowBindings\Steps\EntitySubGridSteps.cs:line 114
   at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(IContextManager contextManager, StepInstance stepInstance)
   at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()

To reproduce

Run the UI test suite.

Expected behaviour

Test passes.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context

https://capgeminiuk.visualstudio.com/GitHub%20Support/_build/results?buildId=8027&view=ms.vss-test-web.build-test-results-tab&runId=1015220&resultId=100022&paneView=debug

tdashworth commented 2 years ago

From the stack trace, this looks to be an EasyRepro issue around getting the count of records in a sub-grid.

AhmedD43 commented 2 years ago

Test has been resolved and passes when run.