How to handle random pop ups during web automation and irregular csv data


I’m facing two challenges.

  1. I’ve a CSV file which I’m reading into data table using Read CSV activity. The delimiter is semicolon. The first line is properly read as headers. The data from the second line onwards is completely read under first column and all other columns are empty(even though data in all rows is seperated by semicolon). Can someone please tell me the problem here? Am I doing something wrong? The csv file is in the attached zip file.

  2. After reading data from CSV file, I need to input values from each row into a website called “” (in the level 1 challenge). Thi s is similar to where we input values in the fields which change positions after every submission. Additionally in this website, random pop ups occur at random times. I need to click on cancel button in the pop up and continue work. I used global exception handler to identify and cancel pop up. But still my workflow doesn’t go to exception handler, it keeps inputting values even though there’s a pop up. Below is my project file: (197.2 KB)

Can someone help?


Hi ,

The CSV contains the " with the text itself . So you can try to read as text , replace all double quotes as empty string and then convert the to Datatable.

1 Like

Hi @Surya_Narayana_Korivipadu,

1. CSV string format
The csv contains " " on some of the fields and all fields are encapsulated with "" as well.

I guess since it is a challenge, they just want you to clean the input data before performing the web automation.

  • Read the input csv as a text file → returns a string
  • Replace values to clean the file content (string) and use Write Text file and save it as CleanedInputData.csv
  • Read the CleanedInputData.csv
  • Now since you already have the datatable saved, you can delete the CleanedInputData.csv file

2. Global handler

I would suggest you do not use global handler, instead use a try-catch on the activities where you expect the modal popup to show up.

I could not test or suggest where you can have a try-catch as I was greeted with a login screen.

Why do I suggest a try-catch over a global handler in this case?
It is because this way you can handle multiple popups right there in the execution and tailor the exception handler according to the modal popup. Such challenges usually have multiple popups and each popup may require its own special logic to handle. Some may be exited, some need user to choose a value. You get the point.

3. Better performance

If you want to have better performance / time, avoid Type Into, it is very slow. I suggest you either use Inject Javascript or Set Web Attribute activity. They are very quick when compared to Type Into. I generally avoid type into whenever possible.

For example in the login screen the js script would be.
We wait for document to load, look for form-control and username attribute and set its value to whatever we want.


I modified your Main.xaml : Main.xaml (50.4 KB)

Good luck with the challenge. If you want the best times you have to do everything in JavaScript. If you get stuck, you can learn how to do this in this video from @AndersJensen Robocorp developer using JavaScript to finish the challenge. I doubt UiPath inject javascript can match this but you can give it a try! : RPA Challenge in _ . __ seconds with Robocorp and Ossi (WORLD RECORD!!) - YouTube



Dear Surya Narayana,

For handling Pop Ups you can use either of the below features:

1.You can set the ContinueOnError property to true for click activities in pop up. This will click the required pop up button if the pop up comes else will continue executing other activities if it doesn’t appear.

2.Keep the activity in a try catch so as to continue execution if the pop up doesn’t appear

Thanks and Regards,
Geetishree Rao

1 Like

Thank you. Now I’m able to read CSV file into a data table properly

Thank you very much for your valuable suggestions @jeevith

  1. I’m able to overcome csv issue just by replacing double quotes with empty string. Then I gave ; as delimiter in read csv activity.

  2. As per your suggestion, if I’m not using global handler, then I cannot solve challenge I think. As I said in my post the pop comes at random times. I don’t know at which activity the pop up comes. It’s completely random, it can appear at anytime at any activity. How can I handle this?

Also thank you for showing me alternatives for better performance. I’ll first solve the challenge and then I’ll try to optimize it.

Thank you for the reply @geetishree.rao . I’ll set ContinueOnError for click activities in pop up and I’ll use try catch for this activity.

But how to identify if the pop up is coming at random times? I don’t know after which step pop up appears, it completely occurs at a random step. I thought global exception handler will be useful, but my type into activities in main workflow are neither timing out nor giving errors. They are typing values even though a pop up appears on the screen. So robot never goes to global handler and it never closes this random pop up. Do you have any idea how to identify and close pop ups which are occuring randomly like this?

Keep a activity to handle that pop up as a first sequence and in the right side INVOKE THE WORKFLOW that is the entire sequence of activities as a separate workflow been called with INVOKE WORKFLOW FILE activity

Cheers @Surya_Narayana_Korivipadu

1 Like

Thank you. I’ll try this

1 Like

Dear Surya,
Please use the below activities to handle the same:
Pick Up Branch
Parallel activity

Always ,Surround the workflow with try catch and try to debug what error do you get in such scenarios

It will be helpful if you can tell the scenarios where you get pop ups

Geetishree Rao