Take Dynamics 365 CRM Testing to the Next Level with EasyRepro

Sumanth Kusuma

Sumanth Kusuma

Microsoft Dynamics CRM partners can benefit from integrating EasyRepro’s test automation capabilities into Dynamics 365 CRM implementations. By leveraging EasyRepro, CRM partners can automatically test Dynamics 365 CRM systems and validate interactions with the Microsoft user interface. This can be especially useful for testing Business Process Flows (BPFs). While EasyRepro can interact with BPF dialogue boxes, it currently is limited to testing only up to the point where a BPF stage’s dialogue box appears. By partnering with EasyRepro, Microsoft Dynamics CRM partners can provide more robust testing services and solutions to their clients using Dynamics 365 CRM. The automated testing EasyRepro enables can help catch issues earlier and validate that integrations and customizations behave as expected, providing value to both the partner and end client.

But what if you wish to proceed to the Next Stage, the Previous Stage, or finish the BPF for the record instead?

In this article, you will find the response to your query. In addition, we’ll provide you with a general function in the dialogue box to carry out any BPF activities right here.

Let’s use the opportunity record as a business process flow example. We are now at the Qualify stage and want to go on to the next step, which is Develop. Again, we will utilize our generic function to do this.

Let’s now invoke our function. In this case, four justifications support our desire to access the Qualify stage and go on to the Develop stage by selecting the Next Stage button. For executing EasyRepro methods, the other two are XrmApp and WebClient.

To Know:

Both XrmApp and WebClient, which are classes of EasyRepro, are known as the useApp and clientWeb.

PerformBPFaction(“Qualify”, “Next Stage”, useApp , clientWeb);

The output of the mentioned function can be seen in the image below after invoking it. It has moved on to the Develop stage.

The Pop-Up dialogue window will shut if we call our function and add the second argument as “Close.” Here, we need to shut the dialogue box for the “Develop” stage.

PerformBPFaction(“Develop”, “Close”, useApp, clientWeb);

We can see that the dialogue window, which was previously open, has been closed by using the above function.

The use of this general function allows us to do a variety of tasks, including “Set Active,” “Finish,” “Back ,” and “Pin the stage flyout.”

Let’s now explore the generic function.

You can test that you are on your main window, where the Business Process Flow is present, by applying the first two lines below.

var myBrowser = clientWeb.Browser;

var appWindow = myBrowser.Driver.SwitchTo().Window(myBrowser.Driver.CurrentWindowHandle);

It will pick the stage and show the dialogue box in the following sentence. The stage name which you want to view is ‘stageSelect’ in this example.


We identify the button to click by utilising XPath. According to our example, its oppBPFButton will be Next Stage as we wish to click the Next Stage button. After locating the button, we use the Click() function to click it.

appWindow .FindElement(By.XPath(“//button[@title=’”+oppBPFButton +”‘]”)).Click();

Your action will be carried out when the click method has been used, according to the provided inputs.

Common Method:

private void InitiateBPFActions(string stageSelect, string oppBPFButton , XrmApp useApp , WebClient clientWeb)


        var myBrowser  = clientWeb.Browser;

        var appWindow = myBrowser.Driver.SwitchTo().Window(myBrowser.Driver.CurrentWindowHandle);




            appWindow.FindElement(By.XPath(“//button[@title='”+oppBPFButton +”‘]”)).Click();


        catch (Exception e)


            throw new Exception(e.Message);




Using EasyRepro, the mentioned common function will allow you to perform a wide range of operations on the Dynamics 365 CRM Business Process Flow.

For more information on leveraging Microsoft Power BI’s capabilities, please contact our expert team of consultants at Schwettmanntech.

Share this post