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 / Detect pop up on Chrom...
Power Automate
Unanswered

Detect pop up on Chrome browser and then fill Excel sheet

(0) ShareShare
ReportReport
Posted on by

Hello.

I build a flow on PAD to consult the stats of some invoices and depending on if a pop-up appears I have actions to fill that invoce as "Canceled", but if the pop-up does not appear fill with "ok".

I tried to use the action "If Web Contains" but it doesn't detect the pop-up.

It worked with the "If Image exists" action but it takes around 60s to go on with the other actions.

Is there another way (faster) to do it?

 

Here is my flow and the examples:

1- Fill the box based on Excel data then clicks on "Continue"

tayusso_0-1676071607587.png

2- Then based on if the pop-up appearance it goes on Excel and fill the column right next to the key I entered above.
On this example it does not returned anything so I filled the Excel with an OK

tayusso_1-1676072391030.png

 

tayusso_2-1676072409002.png

3- but on this example it returned the pop-up

tayusso_3-1676072539025.png

So I used the "If image exists" on that pop-up, and if detected it goes to the Excel and run a macro to fill with "Canceled"

tayusso_4-1676072764035.png

 

 

 

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    MichaelAnnis_0-1676073879310.png

     

    Code version:

    IF (UIAutomation.IfWindow.IsOpenByTitleClass Title: $'''Error''' Class: $'''''') THEN
    MouseAndKeyboard.SendKeys.FocusAndSendKeys TextToSend: $'''{Enter}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: True
    # do "Cancelled" route here
    ELSE
    # do "OK" route here
    END

     

    Note, WindowTitle might not be "Error"; that was just a guess.  If you don't know what the WindowTitle is, you can run one to this spot (where the popup appears) and then do a "Get Window - Foreground Window" on it (while it is in focus) and it should return the window title.

     

    Best of luck!

     

    If this doesn't work, let us know.   A few ways to do this.

     

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

    yeah... what @MichaelAnnis wrote is what I do as well, those JS alerts in Chrome are one of the things that annoy me when working with 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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 410

#2
Vish WR Profile Picture

Vish WR 289

#3
David_MA Profile Picture

David_MA 282 Super User 2026 Season 1

Last 30 days Overall leaderboard