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 / On 2nd pass through a ...
Power Automate
Unanswered

On 2nd pass through a flow, it just stays on a step forever & does nothing.

(0) ShareShare
ReportReport
Posted on by 8

Here is the basic setup of how this flow works inside of Power Automate Desktop:

 

Integer loop, from 1 to 10, step of 1.

 

Inside of each loop, it runs a subflow.

 

That subflow then points to the next subflow, and so on, about 10 subflows deep. Once the process is finished, it exits out of all subflows in the correct order, thus returning to the loop subflow page, where it finishes loop 1, and as per instructions, goes again for pass number 2/10.

 

LOOP --> Pass 1 > Subflow 1 > Subflow 2 > Subflow 3 > Subflow 4 etc.

 

LOOP --> Pass 2 > Subflow 1 > Subflow 2 > Subflow 3 > Subflow 4 etc.

 

Here is the problem I'm having. On the 2nd pass, it just fails to click on a UI element on a website. It doesn't cough up an error, it just stays stuck there on that step, with that step highlighted in blue, & will just stay there forever until I stop the flow.

 

The weird thing is, if I run the entire sequence of subflows from start to finish NOT in the loop, it runs all the way through seamlessly from start to finish. & I can repeat it this way over and over again with no issues.

 

It's only when I loop it and go back through for the second pass that it gets stuck at this step.

 

Here's another weird part: On this subflow it gets stuck on, it still runs through several of the first few steps. This subflow opens a webpage, clicks on a few web page elements, then clicks on a UI element button on the website to start an upload.

 

*It is only the "Click UI element" step that it gets stuck on.* The other ones run fine on the 2nd pass.

 

It's something specific to "Click UI elements", as recorded by the desktop recorder. Another reason I know this is because earlier I had a version of this flow where one of the first steps was to click on a button on the website as a desktop recording where it was clicking on a UI element -- not a webpage element. And on THIS earlier step in the process, it failed. I switched this to a webpage element just to see what happens, and it gets past that point. It's only the "Click UI element" steps where it just stays stuck in No Man's Land forever.

 

Here are the details of this particular UI element: " > document[Class="Chrome_RenderWidgetHostHWND"] > list:eq(0) > listitem:eq(1) > button[Name="laptop My device"]"

 

And here is a screenshot showing more details as well:

 

UI element image 1.png

 

I exit out of all subflows after completing the sequence, so that's not the problem.

 

I also provide a decent wait time before initiating the 2nd pass (about 30 seconds.)

 

I've tried 10 different approaches to work around this and NOTHING is working.

 

Any ideas on how I could make this work where it loops through & successfully clicks on the UI elements on the 2nd, 3rd, etc pass, without just getting stuck there?

 

If I had to guess, I would guess there's some sort of internal signal sent, in the program, after it clicks on that UI element, that basically says: "Yep, this got clicked on already," and that's why it always work the first time when I start the flow, but always gets stuck on the 2nd pass through.

 

It's a flow that in total has about 1100 steps (not a typo) for each pass. And it passes through a max of 10 times, depending on if the loop conditions are met that many. Not sure if that matters.

 

Any ideas on how I could make this work would be greatly appreciated. This is literally the LAST thing I need to figure out to make this flow work perfectly. And I'm stuck & feel like I'm all out of ideas.

 

Thank you.

Categories:
I have the same question (0)
  • AntonD Profile Picture
    8 on at

    Any ideas on this? @yashag2255 @ScottShearer @RezaDorrani @Pstork1 @Jcook 

  • Pstork1 Profile Picture
    69,437 Most Valuable Professional on at

    I would suspect the problem is caused by caching at the website.  Try explicitly closing the browser at the end of each loop.  It will take longer, but if that works then you know the issue is related to caching and that may be the only way to solve it.

  • AntonD Profile Picture
    8 on at

    Not a bad idea, but I already have it set up to where, at the end of each subflow that accesses a certain website, I close out of that browser once I'm finished using that site.

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 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard