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 / Unattended flow - Fail...
Power Automate
Answered

Unattended flow - Failed to write in textbox (textbox wasn't found)

(0) ShareShare
ReportReport
Posted on by 42

Hi everyone,

 

I am running into an issue with running my looped unattended flow, and need some guidance please.

The flow I have screenshots of flow and error below, run perfectly when ran manually or in attended mode, just not unattended.  I already have modified the display settings in the .xml.config file, which helped me for my other three unattended flows.  I have tried the suggestions of this post

That didn't help me, and before reading that post I tried a few other things like focus UI window, send click but none of those have worked either.  When I had the "focus window" step, the flow would fail saying "cannot focus: can't find window" so I took that out, and now the action where it fails is continuously step 38 in the screenshot below which i receive the following error in the run history (see below), and not sure why this is happening if I can run the flow manually with every modification i make, successfully, but not in unattended.  I will tell you that it does take some time to populate the text in the text box, as well as click on the "open" button, even before I added waits to the flow, which i don't know why that is, not a big deal, but if anyone could possibly explain that to me I'd appreciate it as well.

 

Problem while executing action 'PopulateTextField'. Failed to write in textbox (textbox wasn't found)

Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Failed to write in textbox (textbox wasn't found) ---> Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Exceptions.ElementNotFoundException: Exception of type 'Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Exceptions.ElementNotFoundException' was thrown.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.Proxy.RemoteAutomationRuntimeProxy.HandleResult[T](Func`2 func)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.PopulateTextFieldInWindow.<>c__DisplayClass17_0.<Execute>b__0(IAutomationRuntime r)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Common.UIAutomationActionBase.PerformAutomation(Action`1 action, UIControl control)
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.PopulateTextFieldInWindow.Execute(ActionContext context)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.UIAutomation.Actions.PopulateTextFieldInWindow.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

commalliance_0-1673717253231.png

commalliance_1-1673717337744.pngcommalliance_2-1673717441918.pngcommalliance_3-1673717494952.png

 

  • OkanAutomation Profile Picture
    107 on at

    Hi,

     

    You can try to put some activities before 38 to make sure the loading process is not getting in the way, Like wait 15 seconds or wait until ui element is in window. If that is the case, then keep these activities in your flow. 

     

     

    Can you send a screenshot of your ui-element and the selectors? It might have something to do with those as it gives an error on finding the ui element. 

     

     

  • BalamuruganDev Profile Picture
    57 on at

    Hi @commalliance ,

     

    I too faced same issue previously and i used msedge also used focus text box, populate text box actions which solved to me.

     

    Which Browser you are using?

    And also try to use actions under "Browser automation" instead of "UI automation"

    Screenshot 2023-01-15 203257.png

     

    Thanks,

    BD

  • Verified answer
    momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Hi @commalliance 

    FIrst thing I notice in your flow that you are using UI elements/actions mixed with Web actions, why is that? Is your page built in a way it uses UI components on the page?

    For example, action 38 - it is form UI automation not web automation - why is that.

     

    But, if you say it works in attended, then perhaps it is screen resolution issue and the the element does not appear on the screen hence cannot be used (it's different with web elements, you can click or populate them even if they are not displayed directly).

     

    So to test this out: add action to set the resolution screen to higher and see it works.

    But honestly, I would re-consider why you use UI automation instead of web automation, unless this is intentional and driven by the page structure.

  • commalliance Profile Picture
    42 on at

    Hi @momlo

     

    Thank you for responding.  I was able to make some changes and instead of populating text in a UI field, I tried using the send keys action, and tried running it in unattended mode and ran successful, so i dont want to jinx it since its working fine now. 

     

    But the reason for the mixture of web elements and UI elements is because part of the process the flow does is open the file save as window, so that's why i was using a UI element as well, since that window is not a web element, but a UI one.  Unless you know of a cleaner or better way to do that, I am up for suggestions, since I'm still improving my skills using PAD.

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 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard