Look for key word and current date

I’m having some trouble getting started on a automation. I have attached the URL of the web page i need to extract information from and a picture of the the process with a the steps i need to follow. any help would be very appreciated

https://www.treasury.gov/resource-center/sanctions/ofac-enforcement/pages/ofac-recent-actions.aspx![Presentation1|690x388](upload://o8rdIeGCrS8TdaeXvDFx0jbZF25.jpeg)

@NATHAN_MORA
an anchored selector with the nav syntax would look like this:

<html app='firefox.exe' title='2020 OFAC Recent Actions' />
<webctrl isleaf='1' tag='DIV' colName='Description' innertext='*Designations*' />
<nav up='3' />
<webctrl tag='A' colName='Date' innertext='​{{Month}}/*/2020​' /> 

Month is a string variable with current month value “07”
the day is dynamic as today also is the 7th and not the second.

it can be used within a element exists and if the link exists then use same select within a click.

However in the case of more links exists then the bot will be confused. A cross check if find children, datascrapping will bring out more reliable solutions is recommended as well

1 Like

ppr,
I’m not really clear on what your saying, I have attached my work flow any chance you could check it out and add a few things?

Main.xaml (8.9 KB)

@NATHAN_MORA
quick check datascraping:
grafik

with this extract config:

<extract>
	<row exact="1">
		<webctrl tag="tr"/>
	</row>
	<column exact="1" name="Date" attr="text" name2="Column2" attr2="href">
		<webctrl tag="tr"/>
		<webctrl tag="td" idx="1"/>
		<webctrl tag="a" idx="1"/>
	</column>
	<column exact="1" name="Column3" attr="text">
		<webctrl tag="tr"/>
		<webctrl tag="td" idx="3"/>
	</column>
</extract>

evaluating the retrieved datatable and a little bit enhancing the selectors looks to me as a mor reliable solution

ppr,
I’m still a newbie when it comes to Uipath, any chance you could make up a workflow?

@NATHAN_MORA
I will try to have a look on it after my dinner. But for this please confirm: the given requirement of current date is to reformulate on reports of this month? otherwise currently there is no report to click as 07-02-2020 is not today 07-07-2020

ppr,
Correct, the automation will check this website everyday to see if there has been anything updated for the current date. if the word designations is in the description and it matches the current date then it will click the current date tab. Is there a way for the automation to check every date and description to find out if the date is current and the word designations match ?

ppr,
Im using google chrome as my we browser

I’m having some trouble getting started on a automation. I have attached the URL of the web page i need to extract information from and a picture of the the process with a the steps i need to follow. any help would be very appreciated

https://www.treasury.gov/resource-center/sanctions/ofac-enforcement/pages/ofac-recent-actions.aspx

I’m having some trouble getting started on a automation. I have attached the URL of the web page i need to extract information from and a picture of the the process with a the steps i need to follow. any help would be very appreciated I’m not sure where to start this process

https://www.treasury.gov/resource-center/sanctions/ofac-enforcement/pages/ofac-recent-actions.aspx

@NATHAN_MORA
Unfortunately I was running out of time and also the Chrome extension blocked.
However find some starter Help (working with firefox)

Single click - showcasing the click with nav up selector part mentioned above:
single_click.xaml (9.4 KB)

Multi- Retrieval - retrieving date, Url and Text - filtering to all designations
Multi_Retrieval.xaml (9.1 KB)

It is just a preview and if you are interested on more and do need help for your furthr steps we will support you in the forum

Hi NATHAN_MORA,

Kindly follow these steps:
1.Use Assign variable count=3 to pass into the selector dynamically
2.Take While Loop to increment the counter value
3.With the loop use Get Text activity and pass the selector dynamically to get description value
4.Use If condition GetTextValue.Contains(“Designations”)
5.Use Get Text Activity to get Date value
6.Take If condition as DateText.Contains(“07/02/2020​”)
7.Use click activity.

Please check the attached workflow in below for your References.

Sampletest.xaml (14.1 KB)

Hope this helps

Regards,
Neelima

1 Like

1996,
Thanks for the work flow I will try and get it running. I have attached a picture for the missing activities from your work flow. Are the missing activities Text Exists or Get Text Activities? Again thank you

Hi,

Get text Activity is missing for that you need to go to manage package then click on project dependencies and update the package ‘‘Uipath.UIAutomation.Activities’’

Once it’s updated you will be able to see Get Text Activity in Sequence.

Check below attached screenshot.

image

1996,
Got it, The workflow is working, Is there any way to get the automation to only choose links that match the current date (Today’s Date) The automation will check the website everyday and needs to search the description for the word designations and today’s date.if today’s date and the word designation are in the description then it needs to click the date link.

This might be hard because the position of the date links will be different every time there is a new posting the location of the description and date will move down.

I have attached a picture that might help.

Hi,
Case 1:The word Designation is in the description then based on the current date and Datevalue you need to click on current date
1.Assign-Currentdate=Now.toshortDatestring
2.Use If condition GetTextValue.Contains(“Designations”)
3.Use Get Text Activity to get Date value
4.Take If condition as DateText.Contains(currentdate)
5.Use click activity.

Case 2: The word Designation is not in the description then based on the current date you need to click on current date
For this case,
1.Use Get Text Activity to get date value-Assign DateText
2.Use if -conditionDateText=Currentdate
3.Use click activity

Check this workflow for references.

Sampletest.xaml (19.5 KB)

Hope this helps.

Regards,
Neelima.

1 Like

1996,
My automation will check the website everyday for a new posting. Like before it needs to check for the word Designations in the description and check to see if the date link is for the current date. If those two match then click on the date link.

Issue:
The position of the date links and description will change when a new updated has occurred. Today there was a update and the word designation is in the description and the date is 07/09/2020 (Current Date).

How could we get the automation to check the most current updates. Right now the click and get text activities are only clicking on what we tell it to click on. I need the automation to check the new updates and their page position. I have attached a picture. let me know if you need a better understanding or what you think might be a good approach. Thanks for your help on this, I’m still new to Uipath and your help is awesome!

Hi,

Previously, i have provided the Workflow for references there you can check the selectors of description and Date and pass the counter value dynamically.

Let me know if need any clarifications.
Thanks,
Neelima.