cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Karolsweat
New Member

Can power automate get around browser based pop ups?

I have a script that runs through Edge and when it clicks a button to update data its set to click OK from the step if a pop up occurs. Below is pop up 1, which I haven't had issues with so far, its clicked each time. But after the ok it reloads and brings another pop up with the step still in progress and doesn't continue unless i click OK. Is there a way to click OK? based on the steps I cant grab those as they aren't attached to the html browser steps get and UI wont pick it up either

 

1.jpg 

 

This pop up below is what comes up after the above OK is clicked and causes site reload:

 

2.jpg

 

I need a way around this, any help is appreciated! 

 

Edit: spelling and additional info added

6 REPLIES 6
Ankesh_49
Super User
Super User

@Karolsweat Use Sendkeys

Ankesh_49_0-1656097909968.png

 

Cheers,

Ankesh

--------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

VJR
Super User
Super User

@Karolsweat 

 

Have you been able to try this option

 

VJR_1-1656302332915.png

 

 

 

i have when this option appears it clicks the first pop up and reloads the page but the steps do not move to the next as it still registers it as the same window to need to click again

Ankesh_49
Super User
Super User

@Karolsweat Use static delay and then sendkeys after page load.

VJR
Super User
Super User

This sample html code opens up two boxes one after the other.

 

https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert

 

VJR_0-1656562571996.png

 

Using "do nothing when pop up arises" worked fine and closed both the boxes one after the other and moved to the next step.

Also worked the same with "press a button, OK" in the "when a popup arises" dropdown.

I used Chrome by the way.

 

VJR_1-1656562646614.png

 

What is the html equivalent of the boxes you are seeing? 

 

this is a snippet of somewhat the alert looks like i cant put it all, there are about 50 of these functions all within the javascript for each situation and when submitting it will pop up the first one with the error or issue, then once OK is clicked the whole page reloads and then another pop up immediately occurs with the "changes have been saved" and the if pop up on step happens it wont get past that step and just fails 

 

 

<script	language="Javascript">
    var frmObj = document.AppForm;
	var elmsObj = frmObj.elements; 
	var infMsg = " characters remaining out of 500.";
	var errMsg = " characters exceeded than 500 allowed."

	function saveApp() {
		if(document.AppForm.elements["appSequenceBean.aplAppCode"].value == "" 
		|| document.AppForm.elements["appSequenceBean.aplDisAppCode"].value == "" ) {
            alert("Not all required fields are populated.")
            return false;
            }

Cont... 50 more Funtion below
</script>

 

 

Edit: finding out that adding if pop up click button works only if the page doesnt fully reload, so on my site its hit or miss depending on the function ran if the site will fully reload as sometimes it will immediately pop up second box while others it reloads and then pops up but all the while the step is still on the press button waiting to time out

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Top Solution Authors
Top Kudoed Authors
Users online (1,821)