Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k points)

I have an HTML table that has seven columns and 3 rows (the number of rows may be more or less). The second column contains links to PDF files and the seventh column contains the phrase "Corrective Action" I only want to download the PDF files from the columns that contain the word "Corrective Action". However, my code is only downloading the first PDF.

1 Answer

0 votes
by (29.5k points)

Hi, please refer to the steps mentioned below to achieve the task you want to do.

Steps to get the links:

  • Edit the Extract Table command -> Advanced view -> Step 6: Extract Selected Tag details to CSV file. Tag Name: Hyperlink, Attribute Name: Get URL.
  • Save the data to another CSV file. (You can't save it in the same file as it will append or overwrite).
  • Open the file CSV file as a spreadsheet.

Now,Inside the loop

  •  Create a new variable $vCounter$, because the links.csv file dosn't conation headers as the table.
  • Using variable operation assign $Counter$-1 to $vCounter$.
  •  Using Get Cells command and get cell A$vCounter$ and assign it to a new variable $vPDFURL$.
  •  Use $vPDFURL$ as Download file URL in the download command.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...