How download company name wise report (10 reports) from browser

Hii, I’m using UiPath community version 2023.4.0 version ,
Design job for download report(excel file) from browser using web scrapping ,and job was successfully worked but need to change in job ,now I want download report but company name wise ,I mean we have 10 company name and download every company report(excel file).using same above web scrapping.
following are steps:
1)login to browser
2)click on report
3)click on detail
4)one pop up window open then click on search box
6)click on select button(pop up window close)
7)back to parent window
8)Type company name in search box
9)click on preview
10)click on export
11)click on excel
12)move file from download to specific folder
using above download excel file, so same above I want for 10 reports
please guide me for how to update my old job as per new changes

Hi Ashwini,

you used a hard-coded type into for your company, right? For your solution, you can follow these steps:

  1. Open your existing UiPath project.
  2. Identify the part of the workflow where you enter the company name and initiate the download.
  3. Add a “for each” loop that iterates over the list of company names you have.
  4. Inside the loop, replace the step where you enter the company name with the current company name from the loop (variable).
  5. Continue the workflow steps to complete the download process.
  6. Repeat the loop for the remaining company names until all reports are downloaded.

Let me know if this has helped you :slight_smile:

@Fotios_Karamitsos Thank you for your reply ,try the above solution but it will not work properly
create one variable and store all company name which want to search ,but getting not found message .
if company name not found then check for remaining company name .currently it checked only first company name then stop.
please guide me

Hi @ashwini.mali what variable do you use for the for each?

You could do it with a Datatable / Array or List and
a) Wrap the failing Activity with a Try-Catch Block, so that you catch the error and can continue with the other companies.
b) Or use an "Check App State"Activity and then skip the companies if nothing is found.

Feel free to ask if I can provide further informations.

store as array e.g{“”,“”,“”}like wise
how can use try catch in UiPath @Fotios_Karamitsos
PLease give me sequence of activity

Hi @ashwini.mali I don’t know your activities, but here is a Screenshot how it could look like. If you have a .xaml I could help you specifically. The Activity that throws the error (Download probably?) would be sourrounded by a try-catch block

@ashwini.mali has the input helped you?

@Fotios_Karamitsos sorry for the late reply
i tried above solution but still issue not solve

@ashwini.mali what problem do you have now? Can you upload your xaml?

@Fotios_Karamitsos sorry but can’t share my workflow due to some security policy.
but check following steps
1)use assign activity store company name in variable
cmp={" “,” “,” “,” "}
2)use for each activity
in which pass cmp variable
3)click on search box
4)type into activity
pass variable in type activity for type one by one company name which is store in variable
but when pass variable name in type into activity getting error (value of string() can not converted to string)

please attached screen shot and guide me to resolve my issue Please @Fotios_Karamitsos

Hi @ashwini.mali thanks for the detailed description.

Two more questions:

  • What type is your cmp variable? It should be array of strings

  • Where do you get your salaryCompanyName? You can use directly the “CurrentItem” Variable (look at my Screenshot) for the type into, since it will contain the actual company name as a string:

@Fotios_Karamitsos thanks for reply
issue resolved ,but workflow is not run properly ,only type 1 company name in list and stop ,
I want type company name in search box ,if company name is there then click on company name and click on below apply button ,after clicking pop window will close,same process run for all company name (10).loop run 10 time
Please check attached screen shot ,in if company name is not found then no details available ,go for next company name .

@Fotios_Karamitsos please guide me or steps for above

@ashwini.mali now I understand. In this case you don’t need a try catch block. You have different possibilities, depending on the structure of the website:

  • Use “Check App State”-Activity: if the company is shown you click the download button, else you don’t do anything and the loop will start with another company

  • Alternative: “Extract Data Table” and if-condition: If the Number of rows of the extraction is <1, then don’t click the download button.

Option A:

in my case what write in target appearance or not
extract data table is activity? @Fotios_Karamitsos

  1. You have to check the website where a company is shown so that you can select that company entry.

  2. If you want to do it with the Table Extraction instead, there is a wizard for it:

@Fotios_Karamitsos try above solution now ,company name enter but when company name is not found then job will stop.
use app state activity ,so when company name is not then will not enter in target does’nt appear block it will go in target appears block and job failed

Hi @ashwini.mali I can’t help you without knowing the page since every page is different. Try extract Data Table method and Rows < 1