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 / Unable to handle JavaS...
Power Automate
Suggested Answer

Unable to handle JavaScript alert popup in PAD

(0) ShareShare
ReportReport
Posted on by 5

Hi everyone,

I’m trying to automate a web process in Power Automate Desktop, but I’m stuck at a JavaScript alert popup. PAD isn’t able to capture the alert window, and I can’t get it to click “OK.”

 

Details:

 
  • Browser: Chrome

  • Tried: “Click UI element in window” action

  • Result: PAD doesn’t detect the popup, flow gets stuck

  • Goal: Close the alert and continue automation


  •  
 

Has anyone handled this scenario successfully? Any tips or alternative approaches would be appreciated.


I have the same question (0)
  • Suggested answer
    cwischnewski Profile Picture
    162 on at
    It sounds to me like you might be getting hit by an issue with UIA vs MSAA.  UI Automation mode is default and it seems that Chrome has changed or been in the process of changing something related to the accessibility modes or something.  I never fully understood, but we worked through a ticket and the basic resolution is to change to MSAA for capturing those.  When you select Add UI element, in the UI element picker, click the three dots and change from UIA to MSAA.  Then try to capture and use those captured elements.  If that works for you, you might need to go with that.
     
    We had many automation already in production and found it easier to change something from the launch of Chrome instead of finding and replacing all the UI elements in the bots affected.  Since we have one core desktop flow that opened the browser and logged into our application, we could make this change in one place and it fixed all our bots.  This change is to launch Chrome from using a Run application action, providing the path to chrome.exe and adding the '--disable-features=UiaProvider --new-window' as arguments.  
     
     
    This thread lead me to the this answer.
     
    I would suggest to start with capturing MSAA elements first and see if those work for you.  Good luck.
  • CU09020858-0 Profile Picture
    5 on at
     hey thanks for this, i have changed from UIA to MSAA and it worked!!
  • cwischnewski Profile Picture
    162 on at
    Can you please mark my suggestion as answered?

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

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard