download data from website using uipath RPA - uipath

I have automated the login and getting to the downloading page where i have some pdf's which i want to download. These pdf's are dynamic ,sometimes there are 10 sometimes 100 ,it changes everyday.i want to download those pdf's .
please find the attached image
Here i want to download the pdf by clicking each elements in column 3(hyperlink highlighted in blue colour) ,the number of rows in the table is dynamic.how can i do it using UIPATH.

From the top of my head, without knowing the application you are working in I see a few different approaches you can try:
Approach 1: Extract table as Data Table
Perhaps you can extract the table as a Data Table, enumerate the rows and find the individual link selectors you then can pass to a click activity.
Approach 2: Dynamically manipulating the selector
Use UIExplorer to find the selector of the link in the third column. Typically the attribute idx is the unique identifier. You can construct your own variable idx and in a while loop increment this variable while passing it to a click-activitys selector: "<your normal selector here someAttr="something" idx="+idx.ToString+"/>
This way, when the click fails with selector not found you will be at the last row of the column and you can exist the while loop.
Approach 3: Using Find Children
Another approach is to use the Find children activity on the column or table to get the children, i.e. the rows. You need to know which filter to use, it is basically the selector.
Find children outputs a IEnumerable<UIElement> you can iterate and pass to a click activity

The shared image is a perfect case of scraping a table from Web page which can be done through UiPath's Data Scraping Wizard, refer this tutorial. This will convert your html table into DataTable. This Data Scraping Wizard will take care of dynamin number of rows as well as the pagination (if exist).
Later, you've to iterate the DataTable (ForEach activity) and hit the link to download PDF files.

Related

Dynamic text in master page of Birt report

Can dynamic text be entered into a header or footer of a master page?
I have placed dynamic text into a grid which then sits in the master page footer, this doesn't work and gives error:
ReportDesign (id = 1):
+ Invalid javascript expression: ReferenceError: "row" is not defined. (<inline>#1)
When I test the expression in the footer of the report layout itself this works.
Please see the expression below:
if( BirtComp.lessOrEqual( row["Aggregation"], "1,500.00" )){"user1.jpg"}
else if (BirtComp.greaterThan(row["Aggregation"], "1,500.00")){ "user2.jpg"}
The easiest way to use dynamic text in the master page is as follows:
Optional, but recommended: Create a dataset "MasterPage" which selects the dynamic data that you need.
Create a grid in the page footer (and/or header) of the master page.
Bind the grid to the dataset "MasterPage".
Use dynamic text items and data items inside the grid as you like.
Important:
The grid uses only the first row returned by your dataset.
Thus, it is best practice to create the dataset in such a way that it will return exactly one row.
This means that BIRT aggregation functions won't work here.
If your "MasterPage" dataset is JDBC based, you can of course use SQL aggregation functions like SUM, COUNT etc.
It is not possible to access "the current first record for the current page" this way: The "MasterPage" dataset returns one record for the whole report.

Adding a drop-down menu (data validation) after each row of a query result in Google Sheet

First, here is the link to my sheet:
https://docs.google.com/spreadsheets/d/1067N1SAIwpGkMRBZiUv4JW8yDNkozuGt7Fwh6GW-qvE/edit#gid=1742559851
If you look at the tab called "Selection", I have two columns called "Select". All the data in these tables is collected by a query function, except column "Select". In that column, I need to add Data Validation (a simple Yes or No). I want the Data Validation to be automatically added when a new row is created but the query function instead of having to add or remove it manually every time I make some changed. Data collected by the query function is using the two variables on top of the sheet (minimum rating and global buff).
Just to show the step to apply data validation to your whole column, see the following image. Under Cell Range, the image shows Selection!D5:D99, but this is actually set to Selection!D5:D999, it just is truncated due to the size of the text box.
Let us know if this is what you were looking for, or if I've misunderstood your issue.

Google Spreadsheets: Working with data inserted from forms across tabs

I'm in great need of help. I've a form which asks basic questions and puts the results into rows of an existing spreadsheet.
Specific data from those responses are "promoted" to 2nd, 3rd and 4th tabs based on IF formulas on tabs 2+ checking the value of a pull down selection on in the corresponding row on each previous tab. (Waterfall)
My challenge is - forms data is inserted into a new row (Does not use existing) and if I set the pulldown value to "Approved" on the first tab, the formulas on the second tab which were contiguous now skip the row where the form data was automatically entered.
I suspect I need to learn how to properly use ArrayFormula, etc, but have not managed to fix this looking at existing examples combined with my IF statements.
Help is appreciated. Sample is here. Safe to ignore the first and last tabs.
Thank you.
You can try using an open-ended range with ArrayFormula. For example, the formula on "2-Pipeline" in cell D3 could be:
=arrayformula(IF('1-IdeasReceived'!U2:U="Approved",'1-IdeasReceived'!L2:L, ))
The ranges U2:U and L2:L should pick up all rows in those columns, even after you've had forms submitted.
Since this is an ArrayFormula over column ranges, you only need it in cell D3; it will inject CONTINUE formulas down the rest of the column.
Warning: Your spreadsheet is combining dynamic row content (e.g. pulled from another sheet) with static content (e.g. "Environment, Health & Safety" column on "2-Pipeline" sheet). This is bound to result in misalignment if rows are added or deleted in the middle of the source data.

Get page number of a specific record

I'm trying to find a way to get the page number of a specific record.
This is my problem, after I add a new line I reload the grid, with sorting on, the new line can end up on any page. I need to be able to find the page number of that specific record, so I can navigate to its page and select it.
How can I do that, without having to load every page until I find it.
As I see to to accomplish where you would add a new record, reload the grid and then have that displayed page be the page where the new record would be found in a sorted grid. As a solution I think you would need to set the reloadAfterSubmit: false, and then generate your own reload where you would pass in (via postData) a value that would tell your controller to change the page of data to return to the jqGrid.
When the controller would receive a value in this field you would have to write some code to find which page of data the record would belong to and then pass that page to the jqGrid.
As the grid would be sorted, you could find where where that record would be in the sorted dataset and then grab that page. If you didn't have a very large dataset you could just iterate through every page till you found the page that would contain your result, but the method would depend on how large of dataset you would have. (Ex 5 pages of records, probably acceptable to just iterate through them all, as the dataset becomes larger you will have to look into fetching the proper page of data.)

Different layout for 1st and rest pages of report

I currently have a detailed report to design:
A report which has different header-footer-detail for the first and rest of the pages. I tried to overcome the challange by using 2 Master Pages (not quite achieved anything yet) but I am stuck at the point which row count of 1st and rest of the pages... 1st page has 20 rest of the pages have 35 rows. Namely the question is:
"How can I set different pagebreak intervals for the table for each page?"
PS: BIRT version: 3.7
Edit: I've tried to create a group on row number and put a filter on row number to maintain flow between 2 different tables but no luck. (It didnt make real sense to put row filter but tried anyway :))
What you may need to do in the body section of your report is create a grid of one column and two rows. In the advanced properties for the upper cell, look under the section property for the Master Page setting, set that value equal to the name of your first master page. Place your report contents in that cell and set the master page references to your first master page as well. Repeat this for the second cell and references to the second page. Your table(s) have an advanced property for page break interval that you can adjust to control how many rows go on a page.
However if you want your table data to flow continuously from the first page into the second page and onward, I am not sure if this is possible but will update my answer if I find a way.

Resources