Open bhaskarsamudrala opened 2 years ago
I had this same bug, but I came up with a workaround that might work for you while we wait to get it fixed. I added these lines to my code to override the values in Microsoft.Dynamics365.UIAutomation.Api.UCI\DTO\AppElementReference.cs
AppElements.Xpath["Grid_Rows"]= "//div[@ref='centerContainer']//div[@role='rowgroup']//div[contains(@role,'row')]";
AppElements.Xpath["Entity_SubGrid_Row"] = "//div[@ref='centerContainer']//div[@role='rowgroup']//div[@row-index=\'[INDEX]\']";
AppElements.Xpath["Entity_SubGridList"] = "//div[@data-id='[NAME]-pcf_grid_control_container']//div[@ref='centerContainer']//div[@role='rowgroup']//div[@role='row']";
Thank you very much. Looking forward to have fix from the team. How did you overRide the code, any code snippets help me.
You add the lines above to any test method where you use the xrmApp.Entity.SubGrid method.
There may be a better place to put those lines so they work for any test method, but I'm not sure where
Thank you very much. Looking forward to have fix from the team. How did you overRide the code, any code snippets help me.
You should add this code to any Init method depend on you test Framework. For MSTEST: AssemblyInitialize (it is the best), ClassInitialize, TestInitialize
@jdpottle , Given solution is not working for me. Can you explain me a bit in detail where to apply above code ? I have used in Test function but was not working.
I had this same bug, but I came up with a workaround that might work for you while we wait to get it fixed. I added these lines to my code to override the values in Microsoft.Dynamics365.UIAutomation.Api.UCI\DTO\AppElementReference.cs
AppElements.Xpath["Grid_Rows"]= "//div[@ref='centerContainer']//div[@role='rowgroup']//div[contains(@role,'row')]"; AppElements.Xpath["Entity_SubGrid_Row"] = "//div[@ref='centerContainer']//div[@role='rowgroup']//div[@row-index=\'[INDEX]\']"; AppElements.Xpath["Entity_SubGridList"] = "//div[@data-id='[NAME]-pcf_grid_control_container']//div[@ref='centerContainer']//div[@role='rowgroup']//div[@role='row']";
Not working for me, can you check again ?
Bug Report
EasyRepro Version
UCI or Classic Web
Online or On Premise
Browser
Recently Dynamics 365 enabled to 2022 release wave 1 and xrmApp is Unable to identify subgrid and Open the Record. threw exception: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@data-id,'cell-1-1') and contains(@data-lp-id,'Applicants')]"} (Session info: chrome=100.0.4896.127) Special formatting / display
Code to reproduce