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 it here: https://daveburrell.co.uk/power-automate-your-ui-testing-companion-part-1/
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!
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.
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.
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.
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.
You can easily find this out by clicking on start and typing CMD.
You can then use the following commands to find out the domain and 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.
You can also configure advanced options, but I will cover this in a future blog.
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.