[BUG] Unable to Get/SetHeaderValue for Owner
See original GitHub issueBug 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
- Microsoft Dynamics 365 Online Version 8.2 (8.2.x) (DB 8.2.x) online
- Microsoft Dynamics 365 Online Version 9.0 (9.0.x) (DB 9.0.x) online
- Microsoft Dynamics 365 Online Version 9.0.2 (9.0.2) (DB 9.0.2) online
- Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online
UCI or Classic Web
- UCI (XrmApp)
- Classic Web (XrmBrowser)
Online or On Premise
- Online
- On Premise
Browser
- Chrome
- Firefox
- IE
- Edge
Describe the bug
When trying to get the Owner lookup from a header, you get the following error:
OpenQA.Selenium.NoSuchElementException
HResult=0x80131500
Message=no such element: Unable to locate element: {“method”:“xpath”,“selector”:“//div[@role=‘tabpanel’]/parent:://[contains(@data-id, ‘ownerid.fieldControl-Lookup_ownerid’)]”}
(Session info: chrome=79.0.3945.117)
Source=WebDriver
StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value) at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath) at OpenQA.Selenium.By.<>c__DisplayClass19_0.<XPath>b__0(ISearchContext context) at OpenQA.Selenium.By.FindElement(ISearchContext context) at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by) at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.<>c__DisplayClass45_0.<WaitUntilAvailable>b__0(IWebDriver d) in C:\Source\Repos\Easy Repro\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 591 at OpenQA.Selenium.Support.UI.DefaultWait
1.Until[TResult](Func`2 condition)
Special formatting / display
Owner field in the header. Other fields appear to not be affected by the issue
Code to reproduce
xrmApp.OnlineLogin.Login(_xrmUri, _username, _password);
xrmApp.Navigation.OpenApp(UCIAppName.CustomerService);
xrmApp.Navigation.OpenSubArea("Service", "Cases");
xrmApp.Grid.SwitchView("Active Cases");
xrmApp.Grid.OpenRecord(0);
LookupItem ownerId = new LookupItem() { Name = "ownerid" };
string ownerIdValue = xrmApp.Entity.GetHeaderValue(ownerId);
OptionSet priorityCode = new OptionSet() { Name = "prioritycode" };
string priorityCodeValue = xrmApp.Entity.GetHeaderValue(priorityCode);
xrmApp.ThinkTime(2000);
Expected behavior
Be able to retrieve and set the owner field from within the header
Screenshots
Additional context
The header owner field appears to be set to a data-id of “header_ownerid.fieldControl-Lookup-ownerid”
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@AngelRodriguez8008 Thanks! I will check it out.
Hi @jowells1,
How had works my fixes for you? I am changing the logic for the other controls types. Did you find some Issue?
BR Angel A.