microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
523 stars 289 forks source link

[BUG] XrmApp.Lookup.SwitchView(viewName) selenium exception. #948

Open markcunninghamuk opened 4 years ago

markcunninghamuk commented 4 years ago

Bug Report

Issues should only be created for items related to covered functionality.

Not covered functionality, feature requests, and questions should use the Feature Request or Question templates.

EasyRepro Version

UCI or Classic Web

Online or On Premise

Browser

Describe the bug
When switching view on a lookup field, Selenium not found exception thrown. I believe it is a known issue as the test has been marked as [TestCategory("Fail - Bug")] in the sample tests.

Special formatting / display

Code to reproduce

Expected behavior

Screenshots

Additional context

Code to fix it

            //Driver.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Lookup.ChangeViewButton])).Click(true);
            //Driver.WaitUntilAvailable(By.XPath("//li[contains(@role,'treeitem') and contains(@class,'bu')]"));
            //Driver.WaitUntilAvailable(By.CssSelector("li[aria-label='" + viewName + "']")).Click();
JakeObrienMercuryXrm commented 4 years ago

I am having an issue with the switch view but my error is a different. It clicks on the switch view drop down but then when attempting to click on the option from the drop down list it then errors with the following:

Message: Test method B_Microsoft.Dynamics365.UIAutomation.Sample.Tests.IndividualTests.ContactTimeline.SearchForContactAndAddAppointmentOnTimeline.test_SearchForContactAndAddAppointmentOnTimeline threw exception: System.ArgumentException: An item with the same key has already been added. Stack Trace: ThrowHelper.ThrowArgumentException(ExceptionResource resource) Dictionary2.Insert(TKey key, TValue value, Boolean add) Dictionary2.Add(TKey key, TValue value) <>c.<OpenViewPicker>b__44_0(IWebDriver driver) line 1549 DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) line 28 BrowserCommand1.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) line 136 BrowserCommand1.Execute(IWebDriver driver) line 36 BrowserPage.Execute[TResult](BrowserCommandOptions options, Func2 delegate) line 182 WebClient.OpenViewPicker(Int32 thinkTime) line 1533 <>c__DisplayClass45_0.<SwitchView>b__0(IWebDriver driver) line 1563 DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) line 28 BrowserCommand1.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) line 136 BrowserCommand1.Execute(IWebDriver driver) line 36 BrowserPage.Execute[TResult](BrowserCommandOptions options, Func2 delegate) line 182 WebClient.SwitchView(String viewName, Int32 thinkTime) line 1561 Grid.SwitchView(String viewName) line 23

merchantshehzad commented 3 years ago

Hi,

Do you have any ETA of this issue.

Regards

Shehzad