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 / Populate text field in...
Power Automate
Answered

Populate text field in window (UI automation) failed when printing webpage as PDF

(0) ShareShare
ReportReport
Posted on by 44

Hi,

 

I am having trouble with getting Power Automate Desktop to populate text field in window. The problem seems to only occur on our unattended bot server (windows server 2019). The steps of the flow is as below, and my problem is with step 4. The process outlined below, will have many iterations (+ 100 each run).

 

1. open/navigate to webpage using chrome browser

2. press CTRL+P (send keys)

3. in the window appearing (where you can select printer, ect.), I press "Save".

4. In the "Save as" window, I need to populate the text field where you enter the path and file name for the PDF you want to save.

 

Step 4 is for some reason very unstable and fails a lot. The strange thing here is that if the robot somehow can find the UI element on the first iteration, then it will have no problem during any later iterations of the run. However, every time we start the robot again, this step has a high risk of failing.

 

Things I have tried:

  • Use screenshots to see the desktop of the server at time of failure (everything looks ok)
  • Check if any of the UI element selectors are dynamic.
  • Have more than 1 UI element selector available.
  • Used both "Click on UI element" and "Focus text field in window" (with same outcome)

 

I get the feeling that Window elements opening as part of a webpage/Web element (i.e. go to webpage and press CTRL+P opens a window element) is somehow problematic for PAD, when running on Windows server (?). I say this, because for step 3 we were also unable to use "click UI element in window" when needed to press "Save".

 

Anyone else having problems with this, in a similar setup?

 

  • VJR Profile Picture
    7,635 on at

    Hi @Daniel23 

     

    What is the error that you get when it does not work?

     

    Also could you try giving a Wait of few seconds just to give it some time to allow the SaveAs dialog box to open and be identified.

  • Daniel23 Profile Picture
    44 on at

    Hi @VJR 

     

    The error message is: Action name: Populate text field in window
    Error Message: Failed to write in textbox (textbox wasn't found)

     

    Below you can see the code for the step. As you can see, I both have wait for window and a delay of 2 seconds before it attemps to populate text field. I also have enabled "on error" on this specific step and have it do a few retries.

    PADerror.png

  • VJR Profile Picture
    7,635 on at

    HI @Daniel23 

     

    Could you please show the selectors for the textbox.

     

    Do make sure no selectors with filenames in the window title or within any other attribute are selected.

     

  • Daniel23 Profile Picture
    44 on at

    Hi @VJR 

     

    Selectors are:

     

    PADerror1.png

  • VJR Profile Picture
    7,635 on at

    HI @Daniel23 

    Not sure which 3 selectors you are displaying.

     

    - Double click on the yellow highlighted UI element on the Right hand side in PAD window.

    VJR_1-1634814727522.png

     

     

    - Then double click on the yellow highlighted (below).

    Then it will show the "Selector builder" box as below.

    Go into each of the check boxes on the left hand side and see whether anything specific to a file name is selected. Why is Edit filename 3 shown in your screenshot?

     

     

    VJR_0-1634814563475.png

     

     

    The Name should not be ticked so that it becomes available to all file names.

     

    VJR_2-1634814815763.png

     

     

    That way please check all the selectors if they are made specific to a particular element. If so they need to be made generic.

  • Daniel23 Profile Picture
    44 on at

    Hi @VJR 

    This is the step that fails. It uses UI element called " Edit 'file name:' 3 "

     

    Daniel23_0-1634815387846.png

    For this UI element, I have added 3 selectors (my previous image) to help identify the field (I have manually added 2 more selectors, than the one that is created when you add the UI element).

    I will try your approach and deselect Name = File name: as you suggest.

     

    However, I thought this referred to what I have highlighed below:

    Daniel23_1-1634815685122.png

     

    Thank you for the suggestion. Will report back if it works 🙂

     

  • Daniel23 Profile Picture
    44 on at

    Hi @VJR 

     

    Unfortunately, it did not solve my issue. I can add that it seems to be related to any window UI element of the Chrome browser. Either it can find all of them or none of them.

  • Verified answer
    Daniel23 Profile Picture
    44 on at

    Update on this.

    I think it solved it by doing the following:

    Terminate all proccesses with name 'chrome' - and then include a 10 sec wait just after I opened the chrome window. 

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard