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 / Automation Browser - s...
Power Automate
Answered

Automation Browser - sometimes jumps out of focus

(0) ShareShare
ReportReport
Posted on by 8,942 Microsoft Employee

Hi again,

 

Another observation and I hope the community can help me, I have noticed that on random occasions the same automation will fail with unable to click button and if I run the process in attended mode, the Automation Browser will load, begin clicking and then the icon with start to flash in the task bar.  If I am quick enough to click on the taskbar icon, the flow will resume but this isn't always required, in fact most of the time the process runs as expected  I thought I was having problems with button clicks but I wonder if somehow, the application is loosing focus and what really jumps out at me during testing is the (sometimes) flashing taskbar icon.

 

Anyone got any experience of this and how it might be overcome?  I am yet to realize if it is totally random or if it's always the same action, but I know it doesn't happen all the time.  

 

Damien

I have the same question (0)
  • NikosMoutzou Profile Picture
    Microsoft Employee on at

    Hello @DamoBird365 !

    This is strange behavior but you could use action 'Focus window', of the 'UI automation' module, for focusing on the Automation browser window and perform the necessary actions.

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @NikosMoutzou 

     

    Would you propose I focus before each UI button press?

    Focus Window

    Press Button

    Focus Window

    Press Button

    Focus Window

    Press Button

    Focus Window

    Press Button


    Or can you propose an error handling type scenario where a timeout occurs?  How would I re-focus and try the button press again?  I would really appreciate an example error handling step(s) for that type of scenario.

     

    Damien

     

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    If it is always the same window, you could handle through an error.

     

    Put all the Press Buttons in an Error Block, and send the Error Block to your Error Subflow which only has 1 command which is to Focus Window.  After "Go to Error Subflow" you should have an option to "Repeat Action" so it will try to "Press Button" again where it left off.

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @MichaelAnnis 

     

    That is a good description of what I can do!

     

    I have tried and tested this and can now recover. 

     

    DamoBird365_0-1629389075803.png

    DamoBird365_1-1629389094570.png

    DamoBird365_2-1629389147962.png

     

    My proof of concept flow simply tries to press the view button on notepad, but if it times out, if runs the sub flow to call notepad and then repeats the failed action.

     

    This is the use case I am looking for to bring my RPA to the next level of error handling.  Thanks

     

    Damien

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @MichaelAnnis / @NikosMoutzou 

     

    I have implemented the solution I detailed above but I wanted to share my observations and look for some more advice if possible?  The RPA will log in to a site via the Automation Browser, click on Web Elements and then Desktop Elements (as they are easier to catch) but when the RPA switches from Web to Desktop, the taskbar icon begins to flash and the first "press button in window" fails (note sometimes and not always!).  Using the error block I can now recover, and I have tried to click on window, focus on window, maixmise window, all without success.  The thing that worked for me was capturing the Automation Browser Icon on the taskbar and simply clicking on it.  This stops the icon from flashing and then results in the button presses picking up where it got stuck.

     

    It's great that the error block recovers from the scenario but I would like to understand why the Automation Browser goes into a state where its icon on the taskbar flashes and the PAD Flow is unable to click on Window Buttons.

     

    Damien

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    It is possible that the UI elements change when it is in a "warning" situation vs a stable one.  I have ran into something similar where my Excel Window should be "Title.xlsx - Excel"; however, during the process, I save the workbook, and now, the window title is "Title.xlsx - Saved - Excel" and none of my UI elements work.  If you have the time, I would capture the Window UI elements both with and without the warning, and compare them side-by-side.  In my previous example, I simply unchecked "Name" from the Window UI element selectors, and it simply looked for the only open Excel window, which was good enough for that flow, so I didn't run into that problem anymore.

     

    Other fixes can be changing the selector to "Contains" instead of "Exact Match".  So, in my example above, I could have simply changed the name selector to "Contains" "Title", and it would have worked for both the original and saved versions.

     

    Hope this helps.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard