cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nsmancini
Regular Visitor

Checking Element in website before downloading.

Ignore my spelling for my English is not too good. I have made a PAD flow that clicks a download link button every day and saves the  file on my computer. On the download button there is a date that shows if the file has been updated to the current day. How could I add a step that checks if this date is the current date. I attached a photo below of what the download button looks like. Thanks for your help

 

link button.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

So, this page is a great example of what you should be able to do.  At the bottom of the page is a list of related topics and to the right is the date.  Here is a phot of the date with the related source code:

MichaelAnnis_0-1641918062269.png


I was able to 'Launch new Chrome' and attach to this window, then use 'Get details of element on web page' to extract the date. 

MichaelAnnis_1-1641918346424.png

 

So, here are your steps:

  1. Add 'Get details of element on web page' to your flow
  2. Make sure the right Browser Instance variable is in the top dropdown
  3. For UI element, click in there, and go to 'Add New UI element' (you should see a popup screen)
  4. Hover over the Liverpool Report download button, Hold CTRL and Left Click
    1. This will add the UI element to the popup window
  5. Click Done on the popup window
  6. Save 'Get details of element'

 

Try to rerun it, and let's see what %AttributeValue% gets us.  Share the text with me here.  After that, it will probably just be using the text features to capture the date by itself.

 

 

View solution in original post

6 REPLIES 6
MichaelAnnis
Super User
Super User

I would try to "Get details of web page" and see if you can't extract the date (it has to be part of that element somewhere).  A last resort would OCR, but I would avoid this.

 

Are there dates available on the output file that could give you this determination.  For example, if this is Excel, and the date always appears in A5, then I would just download it anyways and use that date to run this validation, because that is going to be much easier to set up.

Thanks Michael for the quick reply and taking time to help. I have tried using the get details option but still not having any luck. I was thinking maybe you could make that date a variable somehow and check to see if it was updated using a if statement or some minor programming. 

Can you inspect it, and show us the source code.  It has to be in there somewhere.

Can you inspect it, and show us the source code.  It has to be in there somewhere.

I copied the element and pasted below. Thanks again for your help Michael.

 

<span class="time">January 11, 2022</span>

So, this page is a great example of what you should be able to do.  At the bottom of the page is a list of related topics and to the right is the date.  Here is a phot of the date with the related source code:

MichaelAnnis_0-1641918062269.png


I was able to 'Launch new Chrome' and attach to this window, then use 'Get details of element on web page' to extract the date. 

MichaelAnnis_1-1641918346424.png

 

So, here are your steps:

  1. Add 'Get details of element on web page' to your flow
  2. Make sure the right Browser Instance variable is in the top dropdown
  3. For UI element, click in there, and go to 'Add New UI element' (you should see a popup screen)
  4. Hover over the Liverpool Report download button, Hold CTRL and Left Click
    1. This will add the UI element to the popup window
  5. Click Done on the popup window
  6. Save 'Get details of element'

 

Try to rerun it, and let's see what %AttributeValue% gets us.  Share the text with me here.  After that, it will probably just be using the text features to capture the date by itself.

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,350)