POWER AUTOMATE: Your UI Testing Companion – Part 2

In my previous blog, I spoke about how to create your first UI flow. If you have not read that yet, then please do so as it is a prerequisite for this one.

You can find Part 1 here.

Ok, so I am now working on the assumption that you have read part 1. In this blog, I will talk about how we can run or trigger our newly created UI flow. The advantage of this being a two-step process is that you can reuse each of your UI flows in different ways as you can use any of the standard Flow triggers to kick off your UI Flow.

In this example, I have used it for testing but just think of the possibilities that UI flows could be used for. Do you have a legacy desktop application that does not have any integration options? Using UI flows, you could create a data record in that system when a new record is created in Dynamics! Cool right?

Anyway, enough of my rambling let us get into how to do it!

Prerequisites

  • You need the on-premises data gateway for your device to have the UI flow triggered by Power Automate.
  • A work or school account.

Tip: Do not interact with your device while the flow runs.

Once you have configured the on-premises data gateway, you can go ahead and create a new flow.

Login to https://flow.microsoft.com

Click on create in the left-hand navigation panel.

Three ways to make a flow

In this instance, I am going to create and Instant Flow, though any of the other options can be used. You can even trigger the UI flow as part of a Business Process Flow.

I give the flow a logical name that will allow me to be able to identify it in the future and selected a button trigger.

You then click Create.

The first Action step that you need to add is Run UI Flow.

Actions

In this instance, I have selected for the web as my UI flow is a web UI if you created a desktop UI flow you can choose the desktop option.

You will then be asked to create a connection with your data gateway.

UI flows

You need to enter all of the required information.

Connection Name: Anything Logical

Username: This is the username to login to your computer

Password: As above the password used to login to your computer

Gateway: When you installed the gateway, it will have asked you to give it a name. Select this in the dropdown.

 I don’t know my domain or username.

Once you have entered all of the required details and clicked on create the view will change to allow you to select you UI Flow and Which browser to run the test in.

Trigger a flow

You can also configure advanced options, but I will cover this in a future blog.

Run a UI Flow

Ok, we have now added all the steps required to make the UI Flow run. We can Select Save and then Test Flow.

As of today, that is all you need to run the Flow.

You can expand on this by adding further action to your Flow too, for example, send an email to the test team when the test completes successfully or more importantly if it fails.

This is not a replacement for full regression testing using something like Selenium scripts, but it is an excellent mechanism for taking your first steps into the world of automated testing.

Happy testing!

About the Author:

Hey! I am Dave Burrell a Power Platform Solution Architect. I am an evangelist for all things Power Platform and love nothing more than a #LowCodeNoCode implementation.

Reference:

Burrell, D. (2020). POWER AUTOMATE: Your UI Testing Companion – Part 2. Available at: https://daveburrell.co.uk/power-automate-your-ui-testing-companion-part-2/ [Accessed: 24th March 2020].

Find more great Power Platform content here.

Share this on...

Rate this Post:

Share: