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 / Can power automate get...
Power Automate
Unanswered

Can power automate get around browser based pop ups to choose either Ok or Cancel?

(0) ShareShare
ReportReport
Posted on by 6

I have a script that runs through Edge and when it clicks a button to update data a POP up come up as an example below. I would like to set to Click Cancel instead of Ok. Is there as way to Click on Cancel? 

 

AT09_0-1698765628854.jpeg

 

 

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @AT09 

     

    see using click action either in browser automation section or in UI Automation section 

     

    See whether that helps !

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Most actions under the "Browser automation" group of actions will have advanced options that allow closing a pop-up automatically, if it appears. So, if, for example, you're using Press button on web page, you can expand the Advanced options of the action and in the "If a pop-up dialog appears" field, select "Press a button" and then select the button you want to press:

    Agnius_0-1698815655746.png

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • AT09 Profile Picture
    6 on at

    I have already tried this method but it's still pressing Ok button instead of Cancel 😞 

  • Gidi Profile Picture
    601 on at

    Hi,

     if nothing else works you can try to use send keys action. 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Have you also put in "Cancel" into the "Dialog button to press" field?

  • AT09 Profile Picture
    6 on at

    I have tried this too but didn't work.

  • AT09 Profile Picture
    6 on at

    Yes

  • Gidi Profile Picture
    601 on at

    too bad, then try to use as last resort the move mouse action to click on the screen position

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you have tried all this and it still doesn't work, what you need to do is disable the "Wait for page to load" toggle on the Press button on web page action. It will then press the button and continue to the next action right away. When you do that, you can then actually send some keys, or use the Click element in window action or even Move mouse to image action - whichever works best for you. The trick here is that if Press button on web page is waiting for the page to load, and the pop-up appears, it will continue waiting infinitely and not allow the flow to continue, so that you could have a following action that closes the pop-up. That's why you need to make it not wait for the page to load, to be able to close the pop-up.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard