How to Click on the most recent date

Hello,

I had a Windows window:

I want to Click in the most recent range (in resumé) the range must be before the todays date.

  • Read all the data using Screen scraping.
  • Use Match Activity (For Regex) with pattern “\d{2}/\d{2}/\d{4}”
  • Assign a Date variable “RecentDate” with default value “01/01/1990”
  • For Each Activity with Match Variable, Check the condition (convert.todatetime(item)>RecentDate).
  • If condition true, assign RecentDate = convert.todatetime(item).
  • Now you have the RecentDate in hand.
  • Just use Click Text, In text give RecentDate.tostring(“dd/MM/yyyy”)
2 Likes

hello vivek,

when you write * Use Match Activity (For Regex) with pattern “\d{2}/\d{2}/\d{4}”: is it for the whole scrapped text using is match activity?

for the click Text it will click the on the “Resumé” Column?

Yes. Input for Match activity should be whole scraped text. This activity will give you all the matches in array.

Click text will click on the provided text. If you give text as “01/16/2018” and indicate the entire table, it will click on second row in resume column. I assume there will be one recent date :slightly_smiling_face:

thank you,

on other question if i i had to find the number of occurence of “VIREMENT …VIRE” in:

what should be the actions: i suggest the same, with different match pattern and a counter

You are correct. Match pattern will be “VIREMENT …VIRE”. Use match and a counter :slightly_smiling_face:

I had tryed this but an error occure:

No need to use assign. Use Match activity. :slightly_smiling_face:

If match activity is not there, you should add Uipath.core.activities package.

Hi @abdel,

Have you got solution for your problem?

Hi vivek, i had tested the solution it works when i scrapped once the screen window, but i had to scrap many times the window because of the scroll bar:

here are the steps:

scrape once the window: get the Number of occurence of “VIREMENT …VIRE”

send hot key “pgdn”, rescape and then uses matches increment the counter.

BUT The problem is here, when rescraping there is a possibility that the same “VIREMENT …VIRE” scrapped for the first time and counted will appear in the new window after sending the hotkey

SO WE NEED SOME CONTROL MECHANISME TO CONTROL IF WE HADE ALREADY COUNTED THE NEW retrived “VIREMENT …VIRE”

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.