Do you know any Keyword or any Logic in Robot Framework to get the last day of the Each month. Actually, I am working on a Calendar and in that Whenever it will be last day of the month I need to click on Next Button.
Thanks in Advance!
Do you know any Keyword or any Logic in Robot Framework to get the last day of the Each month. Actually, I am working on a Calendar and in that Whenever it will be last day of the month I need to click on Next Button.
Thanks in Advance!
Python's calendar library can provide this information.
In your Robot test script you can call
calendar.monthrange(year, date)
which will return a list of two numbers, the 0th element is the weekday of the first day of the month, and the 1st element is the days in the month.
In example
${year}=    Set Variable    2022
${month}=    Set Variable    2   
${tupleContainingEndDate}=    Evaluate    calendar.monthrange(${year}, ${month})
${numberOfDays}=    Set Variable    ${tupleContainingEndDate}[1]
Log    ${numberOfDays}
${numberOfDays} is:
28