cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmarques
Frequent Visitor

RPA in popup window

Hi,

I am trying to get a report from my team's platform (cloud). This happens by clicking a "Get CSV" and then the issue comes, it opens a popup window where it asks me to click 2 more buttons. But the flow stops when popup opens, because another tab is opened. Is there a way of continuing the flow in that popup window? Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions
jmarques
Frequent Visitor

Hi,

So I actually made this work, after some trial and error. Basically what I did is, I stopped the recording when the popup comes, then I instead of using "Web automation" and using "Go to webpage" and "Click link on web..." I used instead 1 action/task with the "UI automation" and choose the option "Click UI element in window" and added that to the flow, and it seems to be working so far :). Thanks all for the tips.

View solution in original post

9 REPLIES 9
fraenK
Memorable Member
Memorable Member

Just add a launch browser action (for the browser of your choice) and attach it to the pop-up e.g. by title

https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/webautomation#launch...

Then you can continue with using actions on the pop-up

 

burque505
Helper V
Helper V

@jmarques, can I ask what kind of popup this is? For example, is it a JS alert or popup, a modal window, or a Windows "File Select" or "Folder Select" dialog of some kind, or some other kind of popup? If you're free to share a screenshot it will make it easier to propose a solution.

 

I have a working POC using PAD and Autohotkey plus Chrome DevTools Protocol (via the Chrome.ahk library) that will handle JS alerts and prompts using "Page.javascriptDialogOpening" and "Page.handleJavaScriptDialog", if anyone is interested. I realize the fact you'd need Autohotkey may be a deal killer in many situations.

 

The target URL for the POC is the herokuapp JS alerts page.

Hi,

This is is a popup from a cloud based tool. Basically I click a link with JS Open action and then I get the modal as you can see in the screenshot.

 

@fraenK I tried that approach, but it seemed to not work, because it just open a new tab with that page and not a popup, even using the record method.

 

@burque505 it is a popup windown/modal from what I see.Screenshot 

 

Strangely, I record with Katalon and it works fine. 

 

The Autohotkey need to check, 2nd day in this beautiful PowerAutomate world :).

fraenK
Memorable Member
Memorable Member

Your screenshot clearly shows a dedicated Chrome pop-up window with the title "Export Search" (no tab, no modal window). So you probably have to wait for that window, then start a Chrome browser and attach it to an existing instance using that title.

jmarques
Frequent Visitor

Hi @fraenK thanks for the quick answer, mmm I thought I had tried that already, but let me check again and I will make a loom video with the steps you just proposed.

jmarques
Frequent Visitor

Hi,

So I actually made this work, after some trial and error. Basically what I did is, I stopped the recording when the popup comes, then I instead of using "Web automation" and using "Go to webpage" and "Click link on web..." I used instead 1 action/task with the "UI automation" and choose the option "Click UI element in window" and added that to the flow, and it seems to be working so far :). Thanks all for the tips.

View solution in original post

fraenK
Memorable Member
Memorable Member

Can't recommend mixing web with UI automation, two totally different things. You can easily get the popup using the attach to existing instance option from the web browser action.

jmarques
Frequent Visitor

Hi @fraenK,

Any particular reason why? All the tests I did, it always worked fine. Not sure how to do "Attach to the existing instance option from the web browser action.". Thank you.

fraenK
Memorable Member
Memorable Member

Because it uses different object models, web = document through extension, UI = adapted model based on browser presentation. So web based selectors are almost interchangeable between browsers and don't depend on the UI of the browser. UI based selectors might depend on the browser, so if you have to change the browser or the UI of the browser changes, then the selector might stop working.

The "attach" argument can be configured in the launch browser action e.g. Chrome: 

https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/webautomation#launch...

Attach to Chrome tab

By title, By URL, Use foreground window

Specify whether to attach to a Chrome tab by its title, URL, or attach to the active tab of Chrome running as the foreground window

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (36,487)