How to Fix Power Automate Desktop Cannot Find SAP UI Elements
Question details
The user encounters an ElementNotFoundException in Power Automate Desktop when attempting to interact with SAP UI elements during an automation flow.

- Product
- Power Automate Desktop
- Device & OS
- not provided
- Scenario
- Running a recorded desktop automation where window titles, indexes, or application sessions have changed since the initial recording.
- Observed behavior
- The automation fails because the recorded selectors no longer match the current state of the SAP application, triggering an element-not-found error.
Ensure that your SAP application is fully loaded and logged in before executing the automation flow. Verify that no unexpected pop-ups or system messages are blocking the target UI elements.
Recapture SAP UI Elements Using Stable Selectors
Replace dynamic or changing UI attributes with stable selectors so Power Automate Desktop can consistently identify the target elements.
When an application's state changes between sessions, relying on dynamic attributes like session IDs, changing window titles, or coordinates often leads to an ElementNotFoundException. Adjusting the selector to use static, unique identifiers will make your automation significantly more robust.
Launch your SAP application manually and navigate to the exact screen and state where the automation process fails.
Open Power Automate Desktop, navigate to the UI elements pane on the right sidebar, right-click the failing element, and select 'Recapture'.
Click on the recaptured element to open the selector builder. Uncheck any dynamic attributes (such as specific window titles that change, indexes, or session-specific IDs) and keep only stable attributes like Name, Class, or ID.
In your flow designer, drag and drop a 'Wait for window' or 'Wait for UI element' action immediately before the interaction step to ensure the SAP interface is fully active.

Resolve Profile and Correlation ID Errors
If your UI automation failure is accompanied by a lost cloud profile or correlation ID error, you must recover your account state via the official community.
Boost Your Productivity with WPS Office
If you are troubleshooting Microsoft ecosystem tools and working heavily with data exports, consider switching to WPS Office. It is a highly compatible, lightweight, and completely free alternative to Microsoft Office that perfectly handles all your Word, Excel, and PowerPoint needs.
- 1. Download the installer: Visit the official WPS Office website and click the free download button for your operating system.
- 2. Install the software: Run the downloaded executable file and follow the on-screen prompts to complete the installation in minutes.
- 3. Open your existing documents: Launch WPS Office and directly open your existing Word, Excel, or PowerPoint files without losing any formatting.

Frequently Asked Questions
Why does Power Automate Desktop throw an ElementNotFoundException in SAP?
This exception occurs because the recorded UI element's attributes (like a dynamic window title, index, or session ID) change when the SAP application is restarted, causing Power Automate to lose track of the original element.
How can I make my SAP UI selectors more reliable in Power Automate?
You can improve reliability by editing your selectors in the UI elements pane to use static attributes. Avoid using dynamic text, relative coordinates, or session-specific IDs. Instead, rely on unique control IDs, classes, or fixed names.
Will adding delays fix UI automation errors?
Yes, adding 'Wait for UI element' or explicit delays before an interaction ensures that the application has fully rendered the element before Power Automate attempts to click or extract data from it.
What should I do if my Power Automate profile loses access or generates a correlation ID error?
If you encounter correlation ID or invalid cloud type errors after signing in, you will need to contact the Microsoft Power Automate Community. Their specialists can assist with account profile recovery and routing password resets to the correct email address.




