Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +T/lxfg7B7zGrhrWTtxv8X
Power Automate - Power Automate Desktop
Answered

Referencing a popup browser window - Stuck!

Like (0) ShareShare
ReportReport
Posted on 14 Oct 2022 11:05:26 by 112

Hi all, 

 

Background:

I've got a desktop flow that runs through a "Select Customer -> Click some buttons on various screens" in our web-based CRM. It works very well barring specific instances where a warning on the screen means the button to be clicked is actually off the screen in some (very few) instances. 

To try and handle these within the flow, (rather than skip them and manually fix at the end, which is what I have been doing) I figured I'd add a nice simple subflow to call on error that runs a JS function on webpage (Scrolldown) and then repeat the "Move mouse to text on screen" action. 

 

Issue: 

"The Run JavaScript function on web page" action requires me to specify the browser instance as a parameter. The problem is, it's a popup window from the original browser instance that I'm interacting with, and I can't see a way to specify this. Screenshot below should hopefully help explain. 

SimonSmith84_0-1665745273572.png

 

Previously I've not had to refer back to the browser instance, as all the following steps are played out in the 'active window' (the popup). Now I'm having to perform the on-error action however, I need to be able to reference this popup window, and I can't see how to do that. 

 

Any help/advice would be hugely apprec

 

 

 

  • SimonSmith84 Profile Picture
    112 on 20 Oct 2022 at 07:09:05
    Re: Referencing a popup browser window - Stuck!

    Thanks Jamar. I figured a workaround for my specific issue this time, but this is definitely useful to know for the future!

  • Verified answer
    Jamar_Forsythe Profile Picture
    Microsoft Employee on 14 Oct 2022 at 23:32:54
    Re: Referencing a popup browser window - Stuck!

    Use the "Launch New Microsoft Edge" (or your browser of choice) then set it to "Attach to running instance", then choose what method to use to find the browser. I prefer matching by title for an example like this. Also, you only need part of the tab/window name as it will match with the one "closest" to it (think auto complete or starts with or wildcard at the end), you can even use variables here.

    Jamar_Forsythe_0-1665790090856.png

    This will give you a browser handle that you can use to close that popup window or tab

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard
Loading started