Skip to content

[BUG] Unable to Get/SetHeaderValue for Owner #719

@jowells1

Description

@jowells1

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

  • 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.DefaultWait1.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"
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions