Issue in selecting an Element and if possible to Send dates

Hello. I have a task to go to a website and extract reports from that website, there are 52 reports (one for each week), whereas I need the latest date of each month, the issue is that the website “tags” are not reliable and not “selector friendly” i.e, as I select whether with “table extraction” or “For each ui element”, it appears all right as soon as I click ok, the activity gives an error saying Selector not set. I am thinking of going directly to each page of the pdf which is “…/27-dec.pdf” for that I am thinking of using a calendar input and manipulating to select year and get all the last Friday dates of each month, is my course of action valid, and if so how to actually get the calendar and the manipulation to get the dates. If there is an alternative it would be very appreciated.
Thanks

I haven’t actually used it myself, but you could try WebDriver

I’d recommend using http protocol directly if possible.
Open up developer tools in chrome/edge and take a look in the network area as you navigate the website and see if you can find something interesting.

Your idea seems good as well.
To get the last friday of the month you could use code similar to this (copied from chat-gpt):

Imports System

Module Program
Sub Main(args As String())
’ Set the year and month
Dim year As Integer = 2024
Dim month As Integer = 2

    ' Find the last day of the month
    Dim lastDayOfMonth As Date = New Date(year, month, 1).AddMonths(1).AddDays(-1)

    ' Find the last Friday by going back from the last day of the month
    Dim lastFriday As Date = lastDayOfMonth
    While lastFriday.DayOfWeek <> DayOfWeek.Friday
        lastFriday = lastFriday.AddDays(-1)
    End While

    ' Print the last Friday
    Console.WriteLine("The last Friday in {0}/{1} is: {2}", month, year, lastFriday.ToShortDateString())
End Sub

End Module

I have created 3 modules, one for calculating all the dates this is done using the last friday of each month is calculated by subtracting 28(AddDays(-28)), and if current date>29 then (AddDays(-35)).
Then the next module navigates to all the web pages and uts in the link using Dates module output as links (since the links contain dates)
The third module uses OCR a custom python script to extract data from the downloaded pdfs.
Cheers.

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