Capturing popup messages

Hello I have a case where i have to input 10-20 fields with data to an application.
based on data the field may pop up messages. it could be warning message or Error message.

  1. Warning pop up we can ignore but error we have to capture.
  2. the messages for a each field can be different and could be many

question is there a generic way to capture the error messages automatically, if they pop up? do we have to use multiple element exists for each input field to capture different error/warning message on a single field?

It really depends on how the source application is built, most likely if they have the same pop up error window they will have similar selectors. Said that you may create a dynamic selector.

You will need to examine all the error messages for common parameters, keep the common parameters and use wildcards on the variable ones.

So instead of this:


Your selector could look like this.


Then one element exists will work for multiple scenarios

1 Like

thanks Edwin.
but my question is do i have to write the code for if message poped up or not for a field. if we have to use element exists then do i have to write this for each input field to check if any message poped up or not using element exists?

please try to use parallel approach for that issue,

Thank you,

Hi @gsunilusa,

Firstly you can use element exist activity . This element exist should cover all your popups. Usually you can use attach activity for this. Check cls etc selectors. If there is a warning message such as Alert as a title, make it wilcard. (title=‘alert’)

If you think there is a possibility of warning at every step, continue with the parallel activity. If you see it in the buttons, you can add short-term controls with the visible find element activity right after it. In this way, you do not expect exist time out when the error message is not received.

When you catch errors, you can easily read the content with the same selectors.


1 Like

so using parallel activity for same field i have to check for different messages.
like parallel activity with 2 blocks

  1. field 1 → check element exists “if warning” ?
  2. field1 → check element exists “If error”?

and do same like this for another and every field writing its own parallel activity and like this i have to do for all the input fields?

Forget parallel. I don’t understand why people continue to recommend it. It does NOT run more than one activity at the same time.

You just need to do…

  • Input for field 1
  • check for popup
  • Input for field 2
  • check for popup
  • Input for field 3
  • check for popup

Yes it’s tedious. Welcome to UI automation.

1 Like

i bet there should be some way than writing for each field to handle such situation and more over my screen is overview screen with multiple rows. so i need some robust solution instead of writing for each field in each row to handle many possible popups.

As Paul said, parallel activity does not work at the same time.

Depending on the true false condition you specify, it will either run the first one or all the contents in order.

If we explain through the example below, if the element exist is true, the output will only print 1, if false, 1 - 2 - 3

Even if you use parallel, you will still need to add element existler inside.

Maybe you can do this by standardizing the selectors.

Make an array list of the values ​​you need to enter.

1-Use this list in the loop.

2-Enter data for each list element. You will need to bind the selectors to a row count based on the loop’s index.

3-Check if the info window is opened with element exist.

4-If it is open, it will close it and switch to the next item for the next entry.

5-If it’s not info, check if it’s an error window.

6-If it is an eror window you can throw here. If you want, you can also add reading the relevant window here.

7-If it is not an Error window, it will move to the other item in the list.

1 Like

here is what i found though lately
the “triggers scope” with help of “element attribute change” i can handle my requirement and define all my element attribute changes in one trigger scope and write the logic as needed in different background process to capture these messages instead of same process that inputs the data. i believe this can be handled in same process as data input process may be using parallel activities? but not sure
hope this helps someone in future.

Thanks everyone for giving your inputs though

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.