Hi huys. I have a question. I want the robot to filter on a website. He needs to select the last day of the month from the calendar that appears on the screen. However, this value can be variable (31,30,29,28). How can I click on the last day of the month in the calendar?
You can try with this expression
Lastdate = (New DateTime(Today.AddMonths(1).Year,Today.AddMonths(1).Month,1)).AddDays(-1).toString("dd")
Pass this variable in the selector
- In the selector many be you can find
text or aaname or name
in that you can pass thisLastdate
variable to click dynamical for every month
But my selector does not contain the month variable. I need to click on the largest number in the calendar. A small detail: february changes every 4 years
Hello @Ali_Osman_Kaya
-
Open Browser activity: Navigate to the website with the calendar.
-
Find Element activity:
- Set the Selector property to target the calendar element on the website.
- Set the Output property to a variable (e.g., selectedDateElement).
-
Assign activity:
- Create a variable (e.g., lastDay) to store the last day of the month (28, 29, 30, or 31). You can retrieve this value dynamically based on the current month and year.
-
If activity:
- Use a conditional statement to check the current month (e.g., using DateTime.Now) and assign the appropriate value to lastDay.
-
Click activity:
- Target: selectedDateElement
- You may need to modify the selector or use a dynamic selector to specify the day in the calendar (e.g., “[lastDay]”).
-
Close Browser activity: Close the browser when you’re done.
-
End the workflow.
Thanks & Cheers!!!
May be can you share the calender screenshot.
Where did you select the month in the calender?
Thank you but I found an idea. I will assign today’s date to a variable. This variable will only pull the month value. Then I will use the if activity.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.