[BUG] GetValue not working
See original GitHub issueBug Report
xrmApp.Entity.GetValue command not working.
EasyRepro Version
- Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online
UCI or Classic Web
- UCI (XrmApp)
Online or On Premise
- Online
Browser
- Chrome
Describe the bug
Hi guys, seems like the GetValue command is not working. I have checked EasyRepro repo and it seems to be trying to find “input” or “textarea” tagname when using the GetValue command.
if (fieldContainer.FindElements(By.TagName(“input”)).Count > 0) { var input = fieldContainer.FindElement(By.TagName(“input”)); if (input != null) { IWebElement fieldValue = input.FindElement(By.XPath(AppElements.Xpath[AppReference.Entity.TextFieldValue].Replace(“[NAME]”, field))); text = fieldValue.GetAttribute(“value”).ToString();
// Needed if getting a date field which also displays time as there isn't a date specifc GetValue method
var timefields = driver.FindElements(By.XPath(AppElements.Xpath[AppReference.Entity.FieldControlDateTimeTimeInputUCI].Replace("[FIELD]", field)));
if (timefields.Any())
{
text = $" {timefields.First().GetAttribute("value")}";
}
}
}
else if (fieldContainer.FindElements(By.TagName("textarea")).Count > 0)
{
text = fieldContainer.FindElement(By.TagName("textarea")).GetAttribute("value");
}
else
{
throw new Exception($"Field with name {field} does not exist.");
}
Some of the LookupItems are now <div> or
- so it is throwing "Field element {name} does not exist. This was working fine on Friday. We picked the issue yesterday, and we know that there was a Microsoft update during the weekend.
Code to reproduce
xrmApp.Entity.GetValue(new LookupItem { Name = “name”});
Expected behavior
LookupItem value should be found
Screenshots
If you can look into this ASAP should be great. Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (12 by maintainers)
Top GitHub Comments
Sorry. I’m not able to do it. Probably the MS guys did it.
No worries, thanks for helping!