web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Click / “Check UI elem...
Power Automate
Suggested Answer

Click / “Check UI element”, SAP window suddenly shrinks and only the title bar is visible.

(0) ShareShare
ReportReport
Posted on by

Hi

In one of my processes that includes SAP automation, I am using a combination of SAP scripting actions and Windows UI automation actions, depending on the availability of the elements.
There is a scenario where I need to check whether a particular element exists. For this, I used the
"If window contains UI element" action when SAP scripting was not able to detect the element.

However, in certain cases, after using this action — and sometimes after click activities — the SAP window shrinks automatically, and only the title bar remains visible. Due to this unexpected resizing, subsequent UI clicks fail.
At the moment, I am unable to use the “Maximize window” action after every click, as it is not a practical solution for the overall process.

Could you please suggest if there is a permanent or more stable solution to prevent the SAP window from resizing during UI automation?
This issue is urgent, and your guidance would be highly appreciated.

I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,484 Super User 2026 Season 1 on at
    You could add "On block error" -error block that triggers subflow that maximizes the window and then repeats the failed action.
    So if an action is in side that error block then it goes to subflow that does the "Set window state" to maximaized. Then after doing that it repeats the action that failed inside the error block. To prevent infinite loop we add error counter variable called %ErrorCount% and if that reaches 3 it stops the flow with failure.



    On block error configuration:


    Error subflow:


    Consider also adding "Get last error" -action in the error handling subflow.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard