Create and test desktop UI flows

In the following steps, we'll demonstrate how to automate the calculator app to sum two numbers and then store the result for later use.

Create a desktop UI flow

Tip

You can automate other Windows desktop apps by following a similar pattern.

  1. Ensure your device is ready to create UI flows.

  2. Use Microsoft Edge (Version 80 or later) or Google Chrome to open Power Automate, and then sign in with the same work or school account as on your device.

  3. Select My flows > UI flows > New.

    Create new UI flow

  4. Choose Desktop app and then select Next.

    Select desktop

  5. Enter a name for your UI flow into the Flow name field, and then select Next.

    Select desktop

  6. Select Next at the bottom to skip the optional Set up inputs screen since we aren't using inputs in this walkthrough.

  7. Select Download package.

  8. Open the Setup.Microsoft.PowerAutomate.UIflow.exe file. This file is likely in your Downloads folder after you downloaded it in the previous step.

  9. Follow the instructions in the UI flows setup installer to complete the installation.

    Once the UI flows installer completes, you'll receive a prompt from your browser to activate the extension.

  10. On Microsoft Edge (Version 80 or later), select each warning icon in the top right of the browser, and then select Enable extension.

  11. On Google Chrome, select Enable extension when prompted.

    Tip

    If you did not see the prompt in your browser, check the following:

    Continue after you've installed the extension.

  12. Select the Record app card to expand it.

    Select record app

  13. Select Launch recorder.

    Select launch recorder

    The recorder control displays at the top of your screen.

    The recorder control

  14. Start the calculator app.

    Tip

    As your mouse hovers over controls in the app, you'll notice that a blue outline highlights each control. Always wait for the blue highlight before you select a control.

    If the blue highlight doesn't display around the element, it might not be recorded properly.

  15. Select Record from the recorder control.

  16. Select the first number, select +, select the second number, and then select =.

    The calculator app

    Tip

    You will improve automation reliability by:

    • Opening and maximizing the apps you want to record before before you start recording
    • Starting your recording with a click the app title bar to bring it in focus.
  17. Select Done on the recorder control after you complete the actions you want to record.

  18. Close the app that you recorded.

  19. Select the card that starts with "Run script" to view screenshots of the recorded steps.

    Tip

    Select ... > Delete to remove any duplicate steps.

    Show recorded steps

  20. Select Next.

  21. Select Next to skip the optional Set up outputs step since we aren't using outputs in this walkthrough.

  22. Test your UI flow by selecting the Test now button, and then watch your UI flow run.

Important

For best results, do not interact with your device for the duration of playback.

  1. Select Save and exit to save your UI flow.

Known issues and solutions

  • Screenshots are currently lost after saving. We are working on a fix.

  • You may want to add a Close action at the end of your UI flow because UI flows launches a new instance of the applications with each test or run.

  • Select ... > Delete on the recorded actions card to remove any unnecessary/duplicate actions.

  • Right clicks may not play back correctly. In such case, while recording, click left to focus UI flows on the target user interface element, and then right click.

  • If UI flows no longer records or plays back Windows applications after installing a new version, confirm you have the latest version.

Unsupported application types

  • Interactions on Windows (File explorer, startup menu, task bar, etc.).

  • Web browsers (Chrome, IE, Microsoft Edge, Firefox, Mozilla, etc.). Please instead refer to Create a Web UI flow to automate websites.

  • Java applications.

  • Click once applications.

  • Applications with a Web view such as Electron applications.

  • Microsoft Office 2016 and earlier.

  • Microsoft Office online.

Unsupported configurations

  • Multi-screen.

  • Recording through a virtual machine client (Remote Desktop, Citrix, etc.).

  • Multiple instances of an application where the main window titles are identical.

  • Application windows with identical titles, for example, Microsoft Outlook with multiple Untitled – Message (HTML) new mail windows active at the same time.

  • Concurrent recording sessions on a given device.

  • Concurrent playback sessions on a given device. In case of simultaneous UI flow runs, the first one takes precedence and the subsequent ones fail until the first one completes.

  • Playback on a device with a different keyboard layout than the device on which it was recorded.

  • Recording on a device or Windows session while the browser with Microsoft Flow is on a different device or Windows session.

Unsupported action types and behaviors

The following actions will not be recorded:

  • Double click.

  • Mouse move.

  • Mouse hover.

  • Click and drag.

  • Touch or pen input.

  • Open app before recording.

Unreliable behaviors and workarounds for Microsoft Office (desktop)

  • Pin the ribbon before you begin playback to avoid issues that may occur if the ribbon is set to auto-hide during playback.
  • Do not select items by clicking and dragging. For example, don't use shift-click to select cells in Microsoft Excel and don't select text in Microsoft Word or Microsoft PowerPoint by dragging the mouse.
  • Some elements may not work correctly in UI flows for Microsoft Word and Microsoft PowerPoint Desktop applications. For instance, options on the File menu such as starting from blank, or right clicking controls like adding a paragraph in Microsoft Word or changing the layout of slides in Microsoft PowerPoint may not work.

Next steps