microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
513 stars 285 forks source link

[HOW-TO] How to select the modal dialog and set fields within it. #1351

Closed RicardoJacobsen closed 1 year ago

RicardoJacobsen commented 1 year ago

Question

For recurrent bookings in the CRM, there is a modal dialog that pops out. As image below: image

I need to select this dialog and insert data in at as it was in a form.

How do I achieve this?

@Shakevg any suggestions?

RicardoJacobsen commented 1 year ago

I figured out, we don't actually need to select the Modal Dialog we just need to set the fields with the commands:

  xrmApp.Dialogs.SetValue(new OptionSet { Name = "recurrence_pattern", Value = "Weekly" });
  xrmApp.Dialogs.SetValue("txtWeeklyRecurEvery", "2");