Loop through Web Page data

All,
I have an automation I need some help with. I need to loop through a list of dates on a web page. If the automation finds a date that matches the current date then it will click on that date. I have attached a picture of how the data is structured on the web page. Some help would be great. Thank you

loop

Hi @NATHAN_MORA,

Please open two UiExplorer and click Indicate Element. Select different dates, for example 07/10/2020 and 07/09/2020.

Compare the selectors value for the two different dates. The suggested approach is to first examine the selectors to identify repeating or differing patterns usable for automation. If a pattern is found, use Get Text activity to extract the date for comparison using the selector identified earlier. Get Text output value can be check for a match according to your predefined condition. If a match is found, use Click activity on the selector.

This list will be updated weekly, the robot will check the website daily to see if there is a new post for the current date. Can the automation recognize this and act accordingly?

If the automation were to run today it would see there is nothing new for today and it wouldn’t do anything. If there was a update tomorrow then that update would be at the top of the list of the picture i sent, then the automation would click on that update. Hope this helps

@NATHAN_i

Can you share the selector of the element?

Place a click activity and click on indicate element, Now edit selector and paste that

also do same for 2nd element

So that we can guide you

Thanks

Ksrinu,
Here is the web page i will be working with let me know what you think.

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

You can use this selector in a click activity, when you have a string variable to hold the date you want to click:
varStringDate = Date.Today.ToString("MM/dd/yyyy")

<html app='chrome.exe' title='2020 OFAC Recent Actions' />
<webctrl aaname='​{{varStringDate}}' parentid='*ControlWrapper_RichHtmlField' tag='A' />

Hi @NATHAN_MORA,

Please see the attached images for steps to identify the selector elements.




Please note that this not a working script. Just a concept to show you how to get it working. You may need to separately capture all the selector rows and page (2020, 2019, etc.) that matched your required dates and new sequence or workflow to click all the dates.

Please see the attached sample script. When the RequiredDate is found, it will exit for loop and click the date. Only 1 date will be click. Treasury.xaml (10.4 KB) project.json (900 Bytes)

Green Tea,
Thank you for this, I will see if I can get this figured out. Thanks for taking the time to make the step by step visual very much appreciated!!! I’m working as a intern in the automation field and I would be lost with out the help from this forum.