Download files conditionally (Conditions are not working)(Selector or data table issue?)

Hello everyone,

I have posted about a similar issue in the past, now it appears that my application has broken.

The process is as follows

  1. Login to a website
  2. Click the status bar in the menu to bring all new items to the first page
  3. Click and download each item labeled as “New”
  4. Once all new items are downloaded, click new again to reset the data table and find additional new items

The issue here is that the application will continue downloading items that are not new.

It seems like the data table is not refreshing and continues to download old records that are not new. Also, I just noticed that my selector will not validate, so perhaps this is the issue?

This application did work prior to migrating from IE to Chrome…

Could someone take a look at my code and let me know where I am going wrong?




Hey @MF.RPA

So for refreshing you are currently clicking a button in the app ?

Thanks
#nK

Hey! :slight_smile:

Insert a toggle breakpoint at your Do While and try to run your code in debug mode
At the watch panel declare the variables that you want to check the values. That way you can check if your value is updating or not

Hello,

Yes, I am clicking “Status” in the menu bar as seen in the first screen shot.

This will refresh the list and bring all new records to the top of the page.

So now you mean to say, the selector for the “Status” got changed ?

The dynamic selector when click on PDF files changed.

This changed due to the migration from IE to Chrome.

The “Status” selector remained unchanged.

1 Like

Okay @MF.RPA

I’m sorry to say that I’m actually confused on where the issue is exactly.

So now the issue is in the button where you click to download file ?

Here is the process with the issue identified.

  1. The RPA will first click the status button in the menu bar (Screen shot 1)
    1a. This will populate the first 20 NEW records to the first page
  2. The RPA will build a data table with a list of all records on the first page
  3. For each record labeled as new, the robot will download those files.
  4. Once all of the new files have been downloaded the robot will click the status button again to populate the next 20 records to be downloaded
    4a. This list could contain NEW records and OLD records
  5. The robot should build a new data table and only download NEW records

The issue is that the robot is downloading NEW and OLD records.

Okay thanks it’s clear now, so what’s the identifier here for each file ?

Thanks
#nK

In the status column as seen in screenshot 1, will assign a “new” status to the row value if the file needs to be downloaded.

I am thinking that there might be an issue with the dynamic indexing.

1 Like

Yep may be. Don’t depend on the index instead with a unique identifier.

Best way I see here is to go with Find Children activity and iterating the elements to click each.