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 / Slecting menue items a...
Power Automate
Unanswered

Slecting menue items and populating fields is very slow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi experts,

 

I'm having performance issues with rather easy commands such as "Populate text field in window". The first attempt in a new windows results in a waiting time of up to 30 seconds. The following fields are filled fast. The same is when selecting a menu item. It takes up to 10 seconds to get a menu command executed. Putting a "wait 1s"-command before the populate command is not helping either (found this in another post). Sending text through keyboard commands is working fast (e.g. Using Alt-F O instead Menu/File/Open)

 

I encounter these issues in an MS application (notepad; "Inserting text from the clipboad" and "file save as") as well as in own apps.

 

I searched various forums I didn't find anything of real help. Taskmanager is not showing any performance peak. It just looks as if the computer is having a little rest (it's a rather fast model with 11gen I7 processors and 32GB and 8 cores using Windows 10 Pro Version 10.0.19042 Build 19042. Network is fast, too (300MB down- and 100MB upstream).

 

Any hints to overcome these obstakles and to make the automation fast?

 

Cheers,

Stefan

 

I have the same question (0)
  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Does your previous step have the "wait for page to load" option selected? You may try removing that and using your own wait time. I have some web apps where it takes a while for the whole page to officially load, even though you can really go ahead and start populating and working.

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Try inserting Wait for window content before your actions, but.... sometimes things are just slow, seemingly without reason. I'm following the topic to see if anyone has any insights.

     

    @ryule He is automating a Windows application, so there is no wait for page to load setting 😕

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Henrik_M ,

     

    thanks for your hint. I just added "wait for window content" without recognising a change. The window content is recognised fast and thereafter the Keyboard send command keeps waiting for whatever...

     

    I'm using the below command and tried it already with SendTextAsHardwareKeys = false. Changing DelayBetweenKeystrokes doesn't change the waiting time either.

     

    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: SourceFilename DelayBetweenKeystrokes: 5 SendTextAsHardwareKeys: True

     

    Btw: I'm using this step to overcome another PAD issue: Excel.SaveAs results in US dates and numbers which is preventing us from using this function as we need European formatting. So I decided to copy the excel tab to clipboard and paste it to notepad and save as text. That works excellent ;-). In a second app I really need to feed two fields and have the same issue. Somewhere somebody suggested to apply a change in edge which might solve it. But I can't find that post again.

     

    Well, looks like I have to stay patient (a manual action is much faster, though) or to search for another solution.

     

    Cheers

    Stefan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Meanwhile I tested each and every possible command (UI commands or Keyboard commands) to fill the filename during "Saveas" in notepad...always the same: Waiting for the unknown.

     

    The funny thing is that sending CTRL-V followed by CTRL-S works pretty well in notepad.

     

    Does anybody else have an idea?

     

    Cheers,

    Stefan

  • Pavel_NaNoi Profile Picture
    1,074 on at

    Does the same issue occur when you're running from console rather than from debug? 

    the debug mode can be a bit crap sometimes.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Pavel_NaNoi , yes it does.

  • Pavel_NaNoi Profile Picture
    1,074 on at

    Mind sharing some screenshots of your code and what you're trying to do? I can't seem to re-create this issue on my end.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Pavel_NaNoi 

     

    Sure. It's a pretty basic flow as we wanted to try PAD for the first time. 

     

    Automation of SAP Order Import

    This PAD flow aims to automate our internal SAP Order Creation based on Excel files (Approx. 300.000 orders a year).

    Flow:

    1. Copy all files into special path (done by the user on its machine)
    2. Start the flow
    3. User to select the directory containing order excel files
    4. Loop through all files in this directory
      1. Open Excel file
      2. Save content of first tab to tab-delimited txt file
        1.      Filename of txt file is the same as excel base file (just with different extension and in different folder)
        2.      Since Excel.SaveAs from PAD converts date and numbers into an US format we are using a workaround to get the tab-delimited file created
          1. Copy the entire content of the main tab to clipboard
          2. Open Notepad
          3. Paste the clipboard to notepad
          4. Save Notepad content by giving a proper txt filename (this is where it gets slow the first time)
        3. Start own application to read the tab-delimited files and convert the content into an upload format
        4. We need to fill two fields and press a button (second time when it get’s slow)
          1.      Source filename from previous step
          2.      Destination filename with converted upload data

    Once all of this is working, we’ll add the last step to let the orders create in SAP.

    You’ll find code-snipes below (hope your German is good enough 😉; The funny thing is that my computer is installed with English Windows and MS365 versions while some MS apps (like PAD) are running in German, and I cannot change it. Especially the MS cloud apps are all in German language)

     

     

    Prep-Steps: Setting a few variables and asking for the directory containing the excel files

    StefanMeyer_0-1663139828423.png

     

    Now we loop through all files

    StefanMeyer_1-1663139828428.png

     

    StefanMeyer_2-1663139828429.png

     

    StefanMeyer_3-1663139828438.png

     

    App with fields to be filled (had to grey out some sensitive values):

    StefanMeyer_4-1663139828445.png

     

    StefanMeyer_5-1663139828450.png

     

    Cheers,

    Stefan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Please let me share an interesting observation:

    Wenn I run the same commands outside the loop everything is working fine, as soon as they are executed within the loop, the waiting time appears.

     

    Any thoughts?

  • Pavel_NaNoi Profile Picture
    1,074 on at

    Actually not that uncommon for the for each to break something, I'll take a look at it in an ~hour and get back to you.

    Also, is the Sourcefilename just a simple set variable with a file path or is it updated in the code somewhere due to some condition? (My German is indeed, not that good 😄)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard