microsoft / EasyRepro

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

[BUG] XrmApp.BusinessProcessFlow.SetValue fails to set the value of a Yes/No field #1140

Open LukeBenting opened 3 years ago

LukeBenting commented 3 years ago

Bug Report

EasyRepro Version

UCI or Classic Web

Online or On Premise

Browser

Describe the bug
XrmApp.BusinessProcessFlow.SetValue fails to set the value of a Yes/No field. The XPath value for AppReference.BusinessProcessFlow.BooleanFieldSelectedOption assumes the Yes/No field is represented by a checkbox, which is not the case for custom business process flows in the latest Online version, they're represented by a dropdown.

Code to reproduce

XrmApp.BusinessProcessFlow.SetValue(new BooleanItem()
{
    Name = "my_yesnofield",
    Value = true,
});

Expected behavior
For the Yes/No field to be set correctly.

Screenshots
image

Additional context
I can see this problem has been mentioned in the comments of this PR: https://github.com/microsoft/EasyRepro/pull/1036

nivedhakumarF5 commented 1 year ago

I was able to make it work for the GetValue on boolean fields on Business Process flow, might be worth a try but my fix was to tweak the Xpath to use BusinessProcessFlow TextFieldContainer instead of Entity.

image