How to handle Pop-up in UiPath

HI

How to close pop ups during web automation

i use “Element exits” activity to identify the popup and use click activity inside the if activity to close if the condition is true

Any other method to handle this

Thanks in advance

@jai_kumar2 Did you check On element appear activity?


In Modern design Use Check up state:

1 Like

Sounds like you aren’t working in modern. You should be. It’s much superior to classic activities. The modern Check App State is much better than Element Exists.

1 Like

Hi @jai_kumar2

  1. Using the “Element Exists” activity:
  2. Using the “On Element Appear” activity:
    Drag and drop the “On Element Appear” activity onto your workflow.
    Indicate the pop-up element on the webpage.
    Inside the “On Element Appear” activity, place the actions you want to perform when the element appears (e.g., a “Click” activity to close the pop-up).
  3. Using the “Find Element” activity:
    Use the “Find Element” activity to locate the pop-up element on the webpage.
    If the element is found, use a “Click” activity to close the pop-up.
  4. Using try-catch blocks:
    Use the sequence of activities that interact with the webpage in a try-catch block.
    Inside the catch block, handle the exception specific to the pop-up (e.g., ElementNotFoundException) and perform the necessary actions to close the pop-up.

Hope it helps!!

This was very helpful!
Do you know how I can you loop this action? Say-if I am downloading a large Winzip file and multiple files pop-up with an error message?

Hi @laurabjackson what I use to loop through files in a folder is for each activity, that’s what you will most likely see everyone use. A few videos on youtube should give you a the the best ways to use that activity.

Hope this helps.

You could uses a parallel activity to both check for this popup and the downloaded files. If there’s multiple files to download, is it always the same amount of files or can this vary?