How to click on a row which has last date shown in web page?

Hello everyone!
The scenario is : I want to make click on a row from webpage which has last date from all rows in a table.

how can I achieve that ?


First use extract table and get the data and find out which is the highest date and then use the date in click text or as the innertext variable for your selector and perform a click

Orderby function and get the highest date

Dt.AsEnumerable.OrderByDescending(function(x) DateTime.ParseExact(x("Date").ToSTring,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture))(0)("Date").ToString

Here date is the date column name and the dateformat has to be changed as per the format you get in the table

Hope this helps


how can I extract table ? without using Extract Table activity.

There are many data where I have to click last date from all rows and perform some action.
Every time new data arrives, is it worth it to extract Table in each loop ?


If you see my first step it says extract table activity to be used…

As you do not know which is the date to click you need to first find out the highest date and for that you need to scrape all data at once or one by one in a loop and then decide…out of both the first one of extracting and deciding is better and faster


what if table is in dynamic format.
is it possible to extract table from web page which has dynamic rows.
how to do it ?


Extract datatable will take care of the dynamic rows…Set Number of items to 0 to extract all the rows


Let’s say This is the site i want to perform:

I have to check Description which is “verify Account Position” and based on description i have to click last date (2017-05-29) which is smaller than (2018-04-20) and perform other actions.


Use a anchor base activity and give the description you need in the anchor and the base will be the identified date from the extracted table

Dt.AsEnumerable.Where(function(x) x("Description").ToString.Equals("Required description")).OrderBy(function(x) DateTime.ParseExact(x("Date").ToSTring,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture))(0)("Date").ToString

This will give the least date value from the extracted table by filtering on the description column…use this in the anchor base activity…

Also if the rows selector can be identified together then after you get the date you can use that date and description together in the innertext with wild characters to get the row index and then use it or get the child of it to click on the date

<webctrl tag='tr' innertext='* {{Description}} * {{Date}}' /> - Here description and date are variables and this is how the selector looks


Hello @Prabin_Chand

You need to use Table extraction to extract the table from the web page. Then sue the expression as in the below reference post.

Then you need to use a click activity and then pass the date as a dynamic variable.


Main.xaml (22.8 KB)
This is not giving expected result