SofTeCode Blogs

One Place for all Tech News and Support

Automate Web Application using UI Flow

5 min read
ui flow
0
(0)

So UI Flows for Power Automate is now general available! UI Flow is the new Robotic Processing Automation capability for Power Automate. For my talk on UI Flow during Dynamics Saturday Amsterdam I played around with the public preview. In this blog I will write about my experience automating a web app with UI Flows.

Let’s begin with a short explanation what Robotic Process Automation (or RPA) is and how it compares to Power Automate. The concept of RPA is around for some time now. RPA wants to automate user tasks just as Power Automate. However RPA does so by exactly mimicking the input done by the user. You record the mouse clicks and keyboard inputs and the robot replays those. While Power Automate is a Digital Process Automation tool who utilizes API’s wrapped in connectors to automate the tasks.

UI Flow basic block diagram
source microsoft
Power Automate bridges modern systems with legacy systems

Microsoft bridges the gap between RPA and Power Automate with UI Flows. UI Flows are great for automating tasks on applications where there are not any API’s available. So in my company we’ve one such application, we use it for our time registration. As a consultant i’m scheduled to figure for various customers. After my working week I register the time I worked for this customer. this is often an earthly and straightforward task which i actually want to automate.

Create the UI Flow

So let’s undergo the steps to automate this process. you would like to put in all necessary tools and add-ons, The documentation page guides you thru with ease. the primary step is to record the actions you would like to automate by using the Selenium IDE. Selenium Integrated Development Environment may be a record/run tool that a test suit developer uses to develop Selenium Test cases. This tool is from the Selenium Test Suite. UI flows uses this open source tool to make automation.

 

Time Registration
source microsoft
Time Registration for my parental leave

Time Registration for my parental leave

Create a replacement UI Flow for an internet application and enter the address of the webpage. this may mention the Selenium IDE. The startup screen are often a touch overwhelming, however just start recording by pressing the record button within the top right. This brings up the webpage where I enter a record for time registration, which I normally do at the top of the working week. Switch back to the Selenium IDE and press the stop button.

Selenium Finished Recording
source microsoft
Selenium Finished Recording

As a end in the Selenium overview all the steps are recorded. during this screen we will test if the automation works, add manual steps if needed and alter entries to variables. what’s very neat is that the integration with Power Automate Flow. After I press reserve it switches back to my flow. The flow immediately recognizes the variable that I increase the UI Flow, so it adds an input option. this is often pretty sweet, no got to refresh the facility Automate Flow, you’ll immediatly continue your work! See the short clip below to ascertain this in action.

Setting a variable within the UI Flow integrates nicely with an influence Automate flow

 

Integrate the UI Flow into Power Automate Flow

Overview of the Power Autome Flow used for time registrationsource microsoft

Overview of the facility Automate Flow used for time registration

Now that the UI Flow is prepared , let’s land up the facility Automate Flow. i would like to enter my time registration on a weekly basis so I create a manual trigger with a start date and end date as input. With these input parameters I query my outlook agenda to retrieve all appointments. I filter these appointments supported a kind specifically for customer planning. The results of these actions i would like to enter in my time registrations, so I loop through them.

Inside this loop is where I call the UI Flow build earlier. However my item only has the customer name and not the specifics for instance a project name or activity type. that’s why I created an excel file containing this information. From the outlook agenda i’m ready to calculate the hours i’m scheduled to figure , using the subsequent expression:

ticks(items(‘Apply_to_each’)?[‘start’])

Overview of the apply to each agenda item in the Flow
source microsoft

Now we are able to call the UI Flow! it’s as easy as selecting the other Power Automate Flow action. Choose the “Run a UI Flow for web” action, fill within the required properties and you’re good to go! In my example the parameters are mostly results from the retrieve excel action except dayofweek and hours.

Dayofweek is calculated by using the dayOfWeek expression. This integer value i exploit in my UI Flow to work out which hour field i want to submit my hours worked.

dayOfWeek(items(‘Apply_to_each’)?[‘start’])

I calculate Hours using the StartTimeTickValue and EndTimeTickValue to enter:

div(div(mul(sub(outputs(‘EndTimeTickValue’),outputs(‘StartTimeTickValue’)),100),1000000000), 3600)

Use Power Automate Flow the maximum amount as possible

In this example you see i exploit Power Automate Flow for the automation, the trigger and other data sources. this is often my advice to you, use Power Automate Flow the maximum amount as possible for your automation scenario’s with UI Flows. Only use UI Flow when there are not any connectors or APIs available for the appliance you would like to automate.

This concludes my write-up about my experience with UI Flows for web applications. i’m pleasantly surprised with how easy it’s to start out automating apps where no connectors are available. Also UI Flows integrates very nice with Power Automate and updates and bug fixes are coming monthly . In my next post i will be able to show you an example of what you’ll do with UI Flows for desktop applications.

 

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Give your views

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Social Love – Follow US